This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Thu Jun 13 16:13:09 2024 Received: from spaans.ds9a.nl (adsl-xs4all.ds9a.nl [213.84.159.51]) by kylie.puddingonline.com (8.11.6/8.11.6) with SMTP id g8IM4NX31773 for ; Thu, 19 Sep 2002 00:04:26 +0200 Received: (qmail 28775 invoked from network); 18 Sep 2002 08:26:01 -0000 Received: from unknown (HELO spaans.ds9a.nl) (3ffe:8280:10:360:202:44ff:fe2a:a1dd) by mayo.ipv6.ds9a.nl with SMTP; 18 Sep 2002 08:26:01 -0000 Received: (qmail 11265 invoked by uid 1000); 17 Sep 2002 21:35:16 -0000 Received: (maildatabase); juh Received: (qmail 13658 invoked by alias); 25 Jun 2002 06:16:02 -0000 Received: (qmail 13489 invoked from network); 25 Jun 2002 06:16:00 -0000 Received: from unknown (HELO mayo.ds9a.nl) (3ffe:8280:10:360:2e0:4cff:fe39:26ca) by spaans.ipv6.ds9a.nl with SMTP; 25 Jun 2002 06:16:00 -0000 Received: (qmail 4650 invoked from network); 25 Jun 2002 03:29:23 -0000 Received: from unknown (HELO dipsaus.ds9a.tudelft.nl) (3ffe:8280:10:360:2a0:cff:fe14:9dde) by mayo.ipv6.ds9a.nl with SMTP; 25 Jun 2002 03:29:23 -0000 Received: (qmail 24923 invoked from network); 25 Jun 2002 03:29:22 -0000 Received: from unknown (HELO outpost.ds9a.nl) (::ffff:213.244.168.210) by dipsaus.ds9a.tudelft.nl with SMTP; 25 Jun 2002 03:29:22 -0000 Received: from vger.kernel.org (vger.kernel.org [209.116.70.75]) by outpost.ds9a.nl (Postfix) with ESMTP id D83C84567 for ; Tue, 25 Jun 2002 04:58:45 +0200 (CEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 24 Jun 2002 22:48:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 24 Jun 2002 22:48:00 -0400 Received: from otter.mbay.net ([206.55.237.2]:12299 "EHLO otter.mbay.net") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Mon, 24 Jun 2002 22:48:00 -0400 Received: from 195-static.mbay.net (195-static.mbay.net [206.55.243.195]) by otter.mbay.net (8.12.1/8.12.1) with SMTP id g5P2lpPO004119; Mon, 24 Jun 2002 19:47:52 -0700 From: John Alvord To: Christian Robert Cc: Brad Hards , linux-kernel@vger.kernel.org Subject: Re: gettimeofday problem Date: Mon, 24 Jun 2002 19:47:51 -0700 Message-Id: References: <3D17BB4B.F5E2571F@sympatico.ca> <200206251043.28051.bhards@bigpond.net.au> <3D17CF60.1DD1B82D@sympatico.ca> In-Reply-To: <3D17CF60.1DD1B82D@sympatico.ca> X-Mailer: Forte Agent 1.8/32.553 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Spam-Status: No, hits=-3.4 required=6.0 tests=IN_REP_TO version=2.30 X-Spam-Level: Lines: 64 Maybe this is the result of floating point rounding errors. Floating point is notorious for occaisional strange results. I suggest redoing the test program to keep all results in integer and seeing what happens... john On Mon, 24 Jun 2002 22:03:12 -0400, Christian Robert wrote: >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. Took 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; >} >- >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html >Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/