Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



I would also suggest a 64 bit fraction like in struct bintime, which we already have and use internally for timekeeping anyway along with the timespec, timeval conversion functions. Thus collecting can be faster as we don't need to make the conversions when collectiing. I deem converting at userlevel the least worry.

For time stamp fetching see "man 9 microtime" or kern/kern_tc.c:{get,}bin{,up}time(). "get"-versions are cheaper, but only updated at hardclock(). The non-get ones are directly related
to the current time counter.

Frank

On 01/04/17 07:45, Robert Elz wrote:
     Date:        Wed, 4 Jan 2017 05:52:45 +0000
     From:        David Holland <dholland-sourcechanges%netbsd.org@localhost>
     Message-ID:  <20170104055245.GA16923%netbsd.org@localhost>

   | also make it nsec...

Since it is a 64  bt value, better would be pico-secs if it is going
to continue to be a timeval/timespec kind of number - but better would be
to make it be a binary fraction of a second (ie: fixed point with the
point to the left of the MSBit position - then the precision can grow
as needed (to absurd values) without canging the API)

kre




Home | Main Index | Thread Index | Old Index