lkml.org 
[lkml]   [1998]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: GPS Leap Second Scheduled!
Date
From
Chris Wedgwood wrote:
> On Wed, Sep 09, 1998 at 02:13:42PM -0600, Colin Plumb wrote:
>
> > - gettimeofday() never returns the same value twice (documented BSD
> > behaviour)
>
> Ouch... gettimeofday(2) only presently has usec resolution. I suspect
> we can make this report the same value twice on really high end boxes
> (667MHz Alpha maybe, 400Mhz Sparcs?), if not now, in a year or so.
> Even a P.ii 600 or so can probably manage it.

This is defined behaviour. On processors where gettimeofday can be
called more than once in a microsecond (SMP systems, and fast
systems), the kernel is required to keep a last-time-returned, and
increment it and return that if the value calculated is below the
stored value.

If you have the results from two gettimeofday calls, you can always
subtract them and divide by the result without checking for zero.
That's what the spec says.

A kernel will get into trouble if you keep on calling gettimeofday
more than a million times a second.....

Roger.

--
| The secret of success is sincerity. Once you can |R.E.Wolff@BitWizard.nl
| fake that, you've got it made. -- Jean Giraudoux | phone: +31-15-2137555
We write Linux device drivers for any device you may have! fax: ..-2138217

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:1.199 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site