In message <[EMAIL PROTECTED]>, Matthew Dillon w rites: > >:> struct timeval64 { >:> time64_t tv_sec; >:> int64_t tv_frac; /* N/2^63 fractional */ >:> }; >: >:We have this one already, and it's called bintime, except that it >:correctly uses N/2^64 fractional the way binary computers prefer it. >: >:-- >:Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > > Hmm. That's certainly a reasonable point. I suppose a negative > representation is still possible if one considers the entire 128 > bit word as a 128 bit fractional time. > > All right, I'll amend the proposal to use 2^64. the fractional > element will be unsigned, the tv_sec will remain signed.
That is exactly how bintime is defined :-) struct bintime { time_t sec; uint64_t frac; }; If I had a int128_t, I would have used that instead... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message