From: "Ethan O'Connor" <zudark@yahoo.com>
To: R.E.Wolff@BitWizard.nl
Cc: linux-kernel@vger.rutgers.edu, chris@cybernet.co.nz
Subject: Re: GPS Leap Second Scheduled!
Date: Fri, 11 Sep 1998 15:49:27 -0700 (PDT) [thread overview]
Message-ID: <19980911224927.2503.rocketmail@send1c.yahoomail.com> (raw)
Roger Wolff wrote:
>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.....
Modifying Chris's code to call gettimeofday() 4 times
the second time around and to print the usec values
for the four successive calls yields the following on
this system (SunOS 5.6, Ultra-IIi/333Mhz):
athena% a.out
213426
213426
213426
213427
athena% a.out
499126
499126
499127
499127
and even:
athena% a.out
947875
947875
947875
947875
Etc...
FWIW.
-Ethan O'Connor
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
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
next reply other threads:[~1998-09-11 20:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-11 22:49 Ethan O'Connor [this message]
[not found] <19980914165757.A17479@tantalophile.demon.co.uk>
[not found] ` <199809150603.XAA29073@cesium.transmeta.com>
[not found] ` <19980915100729.02790@albireo.ucw.cz>
[not found] ` <35FF1838.6E247F0C@his.com>
1998-09-17 11:51 ` GPS Leap Second Scheduled! Jan Echternach
[not found] <no.id>
1998-09-10 6:34 ` Jamie Lokier
1998-09-11 6:18 ` Michael Shields
-- strict thread matches above, loose matches on Subject: below --
1998-09-09 20:13 Colin Plumb
1998-09-09 23:45 ` Chris Wedgwood
1998-09-09 23:55 ` Chris Wedgwood
1998-09-10 8:36 ` Rogier Wolff
1998-09-10 17:05 ` Oliver Xymoron
1998-09-10 22:02 ` Ryan Moore
[not found] <299BBE59294E@rkdvmks1.ngate.uni-regensburg.de>
[not found] ` <98090822315400.00819@soda>
1998-09-09 0:59 ` H. Peter Anvin
1998-09-09 8:00 ` Chris Wedgwood
[not found] ` <199809092149.RAA06993@hilfy.ece.cmu.edu>
1998-09-10 1:37 ` H. Peter Anvin
1998-09-10 15:05 ` Theodore Y. Ts'o
1998-09-12 19:57 ` Feuer
1998-09-09 16:35 ` David Lang
1998-09-09 4:46 Colin Plumb
1998-09-09 19:08 ` Theodore Y. Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19980911224927.2503.rocketmail@send1c.yahoomail.com \
--to=zudark@yahoo.com \
--cc=R.E.Wolff@BitWizard.nl \
--cc=chris@cybernet.co.nz \
--cc=linux-kernel@vger.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).