Subject: Re: Adding nanotime() API to kernel
To: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 02/10/1999 10:57:08
Ignatios Souvatzis <ignatios@cs.uni-bonn.de> writes:
> - precise, regulated time
> ---> useful for "date" display.
this is currently 'time' and the time returned by microtime().
> - monotime, a time guaranteed to never be <= the last reading, but
> equal to the above when not called too often.
> ---> useful for unique timestamps and similar stuff.
>
> - a continuously (uncorrected, or only corrected at a limited pace)
> running time
> ---> useful for interval timers.
mono_time has the latter property, iirc.
if you're interested in a timestamp that never decreases over the life
of the running system (but may decrease at boot), then a cheap hack on
top of mono_time is probably sufficient.
I actually think the suggestion made by Lucio de Re, of one single
system clock and a separate offset for time jumps, is the right idea...
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.