Subject: Re: Avoiding microtime(9) global state
To: Jason Thorpe <firstname.lastname@example.org>
From: Martin Husemann <email@example.com>
Date: 07/01/2004 16:04:48
On Wed, Jun 30, 2004 at 06:09:05PM -0700, Jason Thorpe wrote:
> What is the point of having microtime() or any microtime()-like call if
> the call's value is meaningless? That's what you're proposing.
No, what I'm proposing is a GetTickCount()^Wnanotime() function
that is very similar to the current cc_microtime implementation,
- has nanosecond granularity
- does not promise strong montonicity
- is not affected by adjtime
It's value would roughly be "time since boot"; the implementation could
probably avoid any locking. I suppose most callers of microtime() could
be easily converted (the scheduler, call wheel, timeout calculations
for ISDN connections :-}).