delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Received: | by 10.224.37.3 with SMTP id v3mr15844944qad.2.1373254453072; |
Sun, 07 Jul 2013 20:34:13 -0700 (PDT) | |
X-Received: | by 10.50.66.134 with SMTP id f6mr989381igt.13.1373254453038; Sun, |
07 Jul 2013 20:34:13 -0700 (PDT) | |
Newsgroups: | comp.os.msdos.djgpp |
Date: | Sun, 7 Jul 2013 20:34:12 -0700 (PDT) |
In-Reply-To: | <201307080318.r683IKof016817@delorie.com> |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | glegroupsg2000goo.googlegroups.com; posting-host=71.34.83.153; posting-account=jrLHRgkAAABPV01ZW_RN_U6Tm5UnYNUx |
NNTP-Posting-Host: | 71.34.83.153 |
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> | |
<201307080318 DOT r683IKof016817 AT delorie DOT com> | |
User-Agent: | G2/1.0 |
MIME-Version: | 1.0 |
Message-ID: | <5fbc6fac-c8c5-4bc7-8dc5-9b6b740b24c6@googlegroups.com> |
Subject: | Re: CLOCKS_PER_SEC of time.h doesn't work to prove it is a value for |
one second | |
From: | "K.J.Williams" <lordwilliams1972 AT gmail DOT com> |
Injection-Date: | Mon, 08 Jul 2013 03:34:13 +0000 |
Bytes: | 2350 |
Lines: | 22 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id r683j2PJ011737 |
Reply-To: | djgpp AT delorie 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 |
On Sunday, July 7, 2013 8:18:20 PM UTC-7, DJ Delorie wrote: > 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. I did notice that difference when I tried my own method of trying to calculate CLOCKS_PER_SEC for each second, that there was 5 second or off results differences in each time I ran the program. I didn't know if I was making a mistake or my assignment of calculating the difference was off. The results varied. Does clock() in DJGPP wrap around after a certain amount of seconds elapsed as stated by that website that I quoted above?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |