Subject: Re: timecounters and rnd(4)
To: Rhialto <rhialto@falu.nl>
From: Frank Kardel <kardel@netbsd.org>
List: tech-kern
Date: 06/23/2006 18:29:39
Rhialto wrote:
>On Fri 23 Jun 2006 at 11:09:04 +0200, Frank Kardel wrote:
>
>
>>true. get*time is quick an coarse as it uses a cached value
>>and avoids accessing any hardware. It is good for places
>>that traditionally accessed the struct timeval {mono_}time structure.
>>It can also be used where resolution is not at premium.
>>the non-get versions try the best for maximum available precision.
>>for rnd -stuff I this you'd like these better.
>>
>>
>
>Those names sound reversed to me, since the non-get versions do
>a more thorough 'getting' of the time.
>
>
yes, it may seem that way, especially when one associates longer
words with more work. Still we have two things to consider here:
- microtime() previously also did the whole work. Thus the
new microtime() should not be less in effort.
- changing that would bring us quite a bit away from *any*
original (ours and FreeBSD) source.
The get* versions replace the kludgy int s = splclock(); tv = time;
splx(s); sequences nicely. And that without spls at all in timecounter
kernels.
>-Olaf.
>
>
Frank