From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: what does struct timeval look like on alpha ?
Date: Sat, 19 Jun 1999 13:16:28 -0700 [thread overview]
Message-ID: <19990619131628.C8357@twiddle.net> (raw)
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 <sys/time.h>
#include <stdio.h>
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~
next prev parent reply other threads:[~1999-06-19 21:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-15 13:34 what does struct timeval look like on alpha ? Uncle George
1999-06-15 21:50 ` Georg Steffers
1999-06-16 0:27 ` Wes Bauske
1999-06-16 7:55 ` Uncle George
1999-06-19 20:16 ` Richard Henderson [this message]
1999-06-20 22:07 ` Meryem Kazanfer
1999-06-20 0:40 ` Wes Bauske
1999-06-20 3:58 ` Richard Henderson
1999-06-20 22:01 ` Uncle George
1999-06-20 22:28 ` Richard Henderson
1999-06-20 23:27 ` Uncle George
1999-06-22 4:34 ` Richard Henderson
1999-06-22 10:05 ` Uncle George
1999-06-27 4:54 ` Richard Henderson
1999-06-27 8:11 ` Uncle George
1999-06-27 20:18 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox