delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/07/23:18:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Sun, 7 Jul 2013 23:18:20 -0400
Message-Id: <201307080318.r683IKof016817@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <930fe945-22b9-4000-80fc-e42858b8f498@googlegroups.com>
(lordwilliams1972 AT gmail DOT com)
Subject: Re: CLOCKS_PER_SEC of time.h doesn't work to prove it is a value for
one second
References: <fd60497c-48ca-47ee-aefa-191f026fd3c1 AT googlegroups DOT com> <201307072036 DOT r67KanNk031567 AT delorie DOT com> <930fe945-22b9-4000-80fc-e42858b8f498 AT googlegroups DOT com>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

I *am* familiar with how clock() is implemented in DJGPP, and the code
takes the raw tick count, and multiplies it by 5.

I.e. despite there being 91 clocks per second, if you measure the
number of clocks in a *specific* second, sometimes you get 95 and
sometimes you get 90.  If you calculate the difference between two
clock() calls over a *long* time, the average is 91 clocks per second.

- Raw text -


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