NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/50112: GCC is broken on NetBSD/Alpha Current,7-0-RC2,7-0-RC1



The following reply was made to PR toolchain/50112; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/50112: GCC is broken on NetBSD/Alpha Current,7-0-RC2,7-0-RC1
Date: Sun, 02 Aug 2015 06:44:37 +0700

     Date:        Sat,  1 Aug 2015 21:15:00 +0000 (UTC)
     From:        "Naruaki.Etomi" <nullnilaki%gmail.com@localhost>
     Message-ID:  <20150801211500.E9F67A6555%mollari.NetBSD.org@localhost>
 
   |  The cause of this problem is my computer set time is wrong.
 
 That should not really cause a benchmark to give incorrect results,
 as the time it was set to will be correct, in the future, and the
 benchmark should work then as well as now.
 
 I suspect your problem is ...
 
 double
 second()
 {
   struct timeval tm;
   double t ;
 
   static int base_sec = 0,base_usec = 0;
 
 base_sec should be a time_t, not int, or things start to get weird from
 2038 (base_sec will appear negative, so the calculation
 
     t = (double) (tm.tv_sec-base_sec) + 
       ((double) (tm.tv_usec-base_usec))/1.0e6 ;
 
 will make a very large value in t (something of the order of 200 years
 I suspect, though I did not calculate it) which, being intended to be
 elapsed time, makes the system seem very very slow indeed.
 
 kre
 


Home | Main Index | Thread Index | Old Index