www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2007/02/28/19:41:44

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
In-Reply-To: <200703010015.l210FOi6004906@envy.delorie.com>
Subject: Re: Final version of gettimeofday() patch
To: djgpp-workers AT delorie DOT com
X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006
Message-ID: <OF8D61EBF3.4C147636-ON87257291.0003A12D-87257291.0003C9EF@seagate.com>
From: Gordon DOT Schumacher AT seagate DOT com
Date: Wed, 28 Feb 2007 17:41:23 -0700
X-MIMETrack: Serialize by Router on SV-GW1/Seagate Internet(Release 7.0.1 HF29|March 07, 2006) at
02/28/2007 04:41:27 PM
MIME-Version: 1.0
X-Proofpoint-FWRule: outbound2
X-Proofpoint-Virus-Version: vendor=fsecure engine=4.65.5502:2.3.11,1.2.37,4.0.164 definitions=2007-02-28_06:2007-02-28,2007-02-27,2007-02-28 signatures=0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

DJ Delorie <dj AT delorie DOT com> wrote on 02/28/2007 05:15:24 PM:

# > +      double secs;
#
# We need to avoid floating point in libc, whenever possible.  Could
# this be done with suitably scaled integer math?  CLOCKS_PER_SEC is
# scaled by five to make it an integer.

Hmm... let me ponder that.

(I'm assuming this is to avoid issues on systems without FPUs?)

The goal there is to be as precise as possible so as to avoid clock
skew.  As you can see that frequency is not a very nice number...
but perhaps working with a long long int we'd have enough precision?

I'll have to think about that.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019