[fpc-devel] Problem with Now() and time changed by ntpd

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Nov 2 10:41:57 CET 2011


On Wed, Nov 2, 2011 at 9:56 AM, Marco van de Voort <marcov at stack.nl> wrote:
> Not entirely related to the discussion, but I don't see that at all.  There
> is a reason why libc has monotonous time functions.

And I think we should have too:

Now() -> Like Michael proposed. Implemented with precision, but with a
switch for existing code bases to hack it into being fast.

And for new projects 2 new methods:

NowUTC() -> Current time in UTC
GetMonotonousTimeCount() -> Gives the number of microseconds since an
unspecified initial time which is totally fixed. This one people
should use for more precision timing.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list