Subject: Re: Avoiding microtime(9) global state
To: Frederick Bruckman <fredb@immanent.net>
From: Erik E. Fair <fair@netbsd.org>
List: tech-smp
Date: 06/30/2004 13:19:44
It's very important to separate Time of Day from interval timing.

Time of Day you adjust to be correct with NTP, or just with date(1), 
so that when you want to record the time that an event occurred, you 
take this value.

Interval timing is to measure between a start point and a stop point. 
You never want this going backwards. Principally, you want the 
frequency of the counter to be accurate, so you might adjust how fast 
it's ticking, once you figure out (with NTP or some other method) how 
bad your system's clock crystal is.

NetBSD should provide both facilities (ToD & interval time), and the 
code we write needs to be clear about which it is using and why.

	Erik <fair@netbsd.org>