From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6575 invoked from network); 19 Jun 1999 21:09:48 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 19 Jun 1999 21:09:48 -0000 Received: from piglet.twiddle.net (root@piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA14309 for ; Sat, 19 Jun 1999 16:16:35 -0400 Received: (from rth@localhost) by piglet.twiddle.net (8.8.7/8.8.7) id NAA08396 for axp-list@redhat.com; Sat, 19 Jun 1999 13:16:28 -0700 Date: Sat, 19 Jun 1999 13:16:28 -0700 From: Richard Henderson To: axp-list@redhat.com Subject: Re: what does struct timeval look like on alpha ? Message-ID: <19990619131628.C8357@twiddle.net> References: <199906152150.XAA08340@earth.uni-muenster.de> <37675882.F378EEBC@voicenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <37675882.F378EEBC@voicenet.com>; from Uncle George on Wed, Jun 16, 1999 at 03:55:46AM -0400 On Wed, Jun 16, 1999 at 03:55:46AM -0400, Uncle George wrote: > 1) gettimeofday(), which uses timeval, returns 2 ints from the call to the > glibc routines. No it doesn't. > This is done irrespective of whatever the definition of struct > timeval is. If u define timeval as long, u get bogus looking values. But as > int, the numbers look more reasonable. I don't know what you're doing, but it's screwy. #include #include main() { struct timeval tv; gettimeofday (&tv, 0); printf ("%ld.%ld\n", tv.tv_sec, tv.tv_usec); return 0; } Produces a sane looking "929823352.596453" with a 16-byte timeval. r~