[fpc-devel] Problem with Now() and time changed by ntpd
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Wed Nov 2 11:50:38 CET 2011
Felipe Monteiro de Carvalho wrote:
> 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.
Without meaning to cause offense, I think that should be monotonic (i.e.
it is guaranteed to never decrement).
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list