NetBSD-Bugs archive

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

Re: bin/45257: ping(8) prints bogus round-trip times after Year 2038



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

From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/45257: ping(8) prints bogus round-trip times after Year 2038
Date: Thu, 18 Aug 2011 20:47:14 +0100

 On Thu, Aug 18, 2011 at 06:30:05PM +0000, Ryo Shimizu wrote:
 > 
 >  >Why all the complexity? All you should need is to cast to unsigned when
 >  >assigning.
 >  
 >  No. it is not enough.
 
 Change diffsec() to do:
         return ((uint32_t)(timenow->tv_sec - then->tv_sec)*1.0
                        + (timenow->tv_usec - then->tv_usec)/1000000.0);
 
 
        David
 
 -- 
 David Laight: david%l8s.co.uk@localhost
 


Home | Main Index | Thread Index | Old Index