From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13696 invoked from network); 15 Jun 1999 14:25:14 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 15 Jun 1999 14:25:14 -0000 Received: from voicenet.com (mail12.voicenet.com [207.103.0.6]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id JAA05097 for ; Tue, 15 Jun 1999 09:33:59 -0400 Received: (qmail 27556 invoked from network); 15 Jun 1999 13:33:57 -0000 Received: from dialpool0658-pri.voicenet.com (HELO voicenet.com) (209.71.86.125) by mail12.voicenet.com with SMTP; 15 Jun 1999 13:33:57 -0000 Sender: gat@mail.redhat.com Message-ID: <37665650.914DF422@voicenet.com> Date: Tue, 15 Jun 1999 09:34:08 -0400 From: Uncle George Organization: Big Endian X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: what does struct timeval look like on alpha ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit with gettimeofday() it appears that struct timeval is of int's. With getrusage(), timeval needs to be of long's. SO WHAT's the definition of timeval on the alpha with RH 6.0 & GLIBC 2.1.x signed Confused in New Jersey. following Sample pgm that seg-faults if timeval is defined with int's typedef long jlong; jlong gethrvtime_us(); #include #include #include main() { long l; l = gethrvtime_us(); } jlong gethrvtime_us() { #if 1 struct rusage usage; getrusage( RUSAGE_SELF, &usage); usage.ru_utime.tv_sec += usage.ru_stime.tv_sec; usage.ru_utime.tv_usec += usage.ru_stime.tv_usec; if ( usage.ru_utime.tv_usec >= 1000000 ) { usage.ru_utime.tv_sec++; usage.ru_utime.tv_usec -= 1000000; }; #if 0 jio_fprintf(stderr,"gethrvtime:%ds%dus\n", usage.ru_utime.tv_sec, usage.ru_utime.tv_usec); #endif /* return value in microseconds */ return((usage.ru_utime.tv_sec*1000L*1000L + usage.ru_utime.tv_usec)); #endif } ~ ~