Subject: Re: monotonic time (was Re: CVS commit: basesrc)
To: Simon Burge <simonb@telstra.com.au>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 08/24/1999 18:15:19
Simon Burge <simonb@telstra.com.au> writes:
> Is this worth thinking about more, or should I just drop it?

so, the kernel mono_time variable is supposed to be a
monotonically-increasing kernel time variable...

however:

1) there's no interface similar to microtime() to get a
high-resolution mono-time (microtime() provides a 'time'-like value,
i.e. it can go backwards).  I consider this (and the many bogus uses
of time for timestamps which are related to driver timeouts, and the
like) to be a bug.

2) there's no guarantee that if somebody's not going to set the clock
backward on you and reboot, or something, so you can't really have a
guarantee that you'll have a monotonically-increasing-across-reboots
clock.


cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.