From: Pavel Machek <pavel@ucw.cz>
To: Matti Aarnio <matti.aarnio@zmailer.org>
Cc: "Salvatore D'Angelo" <dangelo.sasaman@tiscalinet.it>,
Chris McDonald <chris@cs.uwa.edu.au>,
linux-kernel@vger.kernel.org
Subject: Re: gettimeofday problem
Date: Mon, 1 Jul 2002 04:29:58 +0200 [thread overview]
Message-ID: <20020701022957.GD829@elf.ucw.cz> (raw)
In-Reply-To: <20020624154620.P19520@mea-ext.zmailer.org>
Hi!
> > In this piece of code I convert seconds and microseconds in
> > milliseconds. I think the problem is not in my code, in fact I wrote the
> > following piece of code in Java, and it does not work too. In the for
> > loop the 90% of times b > a while for 10% of times not.
> >
> ...
> > long a = System.currentTimeMillis();
> > long b = System.currentTimeMillis();
> > if (a > b) {
> > System.out.println("Wrong!!!!!!!!!!!!!");
> > }
>
>
> So in 10% of the cases, two successive calls yield time
> rolling BACK ?
>
> I used gettimeofday() call, and compared the original data
> from the code.
>
> At a modern uniprocessor machine I never get anything except
> monotonously increasing time (TSC is used in betwen timer ticks
> to supply time increase.) At a dual processor machine, on
> occasion I do get SAME value twice. I have never seen time
> rolling backwards.
>
> Uh.. correction: 216199245 0:-1 -- it did step backwards,
> but only once within about 216 million gettimeofday() calls.
> (I am running 2.4.19-pre8smp at the test box.)
Hmm, so it is buggy even for you. He probably has way crappier
hardware. Neptun chipsets and via chipsets have bugs in time
implementation.
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
next prev parent reply other threads:[~2002-07-01 19:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-24 8:55 gettimeofday problem Salvatore D'Angelo
[not found] ` <200206240934.g5O9YL524660@budgie.cs.uwa.edu.au>
2002-06-24 10:20 ` Salvatore D'Angelo
2002-06-24 12:46 ` Matti Aarnio
2002-06-24 13:57 ` Salvatore D'Angelo
2002-06-24 18:56 ` Karim Yaghmour
2002-06-26 11:01 ` Gabriel Paubert
2002-07-01 2:30 ` Pavel Machek
2002-07-01 2:29 ` Pavel Machek [this message]
2002-06-24 19:44 ` Richard B. Johnson
2002-06-24 23:34 ` Frank van de Pol
2002-06-25 11:42 ` Richard B. Johnson
2002-06-28 18:04 ` george anzinger
2002-06-25 13:36 ` Chris Friesen
2002-06-26 10:58 ` Gabriel Paubert
-- strict thread matches above, loose matches on Subject: below --
2002-06-25 0:37 Christian Robert
2002-06-25 0:43 ` Brad Hards
2002-06-25 2:03 ` Christian Robert
2002-06-25 2:47 ` John Alvord
2002-06-25 9:17 ` Christian Robert
2002-06-25 10:00 ` Jan Hudec
2002-07-19 12:17 ` Amos Waterland
2002-06-25 11:45 ` Richard B. Johnson
2002-06-25 11:50 ` Brad Hards
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=20020701022957.GD829@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=chris@cs.uwa.edu.au \
--cc=dangelo.sasaman@tiscalinet.it \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.aarnio@zmailer.org \
/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