public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Robert <xtian-test@sympatico.ca>
To: Brad Hards <bhards@bigpond.net.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: gettimeofday problem
Date: Mon, 24 Jun 2002 22:03:12 -0400	[thread overview]
Message-ID: <3D17CF60.1DD1B82D@sympatico.ca> (raw)
In-Reply-To: 200206251043.28051.bhards@bigpond.net.au

Brad Hards wrote:
> 
> On Tue, 25 Jun 2002 10:37, Christian Robert wrote:
> >   gettimeofday (&tv, NULL);
> How about checking the return value of the function call?
> 
> Brad
> --
> http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

$ time ./tloop
Bump negative -4294967295
Summary:
-------
 Min = 0
 Max = 140068
 Avg = 1 (4064861295/3825797418)

real    67m44.891s
user    29m29.690s
sys     27m53.130s


Same thing. \x14Took about an hour before getting the negative bump.

Xtian.

---- modified GetTime() checking return value of gettimeofday() -----

LL GetTime (void)
{
  struct timeval tv;
  LL     retval;
  int    rc;

  while (0 != (rc = gettimeofday (&tv, NULL)))
    printf ("Wow! gettimeofday () returned %d\n", rc);

  retval = (tv.tv_sec * 1000000) + (tv.tv_usec);
  return retval;
}

  reply	other threads:[~2002-06-25  2:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-25  0:37 gettimeofday problem Christian Robert
2002-06-25  0:43 ` Brad Hards
2002-06-25  2:03   ` Christian Robert [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2002-06-24  8:55 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
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

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=3D17CF60.1DD1B82D@sympatico.ca \
    --to=xtian-test@sympatico.ca \
    --cc=bhards@bigpond.net.au \
    --cc=linux-kernel@vger.kernel.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