|
From: Eric <eri...@cl...> - 2004-12-29 18:08:50
|
Hi Malcolm
I just tried it again and got 990 then 1040
I wonder why? I have a Pentium 4, 2GHz, "GenuineIntel" (according to the control panel.) windows 98se
From Eric
We are all here on earth to help others;
what on earth the others are here for I don't know!
----- Original Message -----
From: "Malcolm Nealon"
To: <dev...@li...>
Sent: Thursday, December 30, 2004 12:03 AM
Subject: Re: [Dev-C++] time - try this,
Hello Eric,
On 29 December 2004, 11:11:18, you wrote:
> #include<time.h>
> #include<stdio.h>
> int main(void)
> {
> clock_t ticks1, ticks2;
> ticks1=clock();
> ticks2=ticks1;
> while((ticks2/CLOCKS_PER_SEC-ticks1/CLOCKS_PER_SEC)<1)
> ticks2=clock();
> printf("Took %ld ticks to wait one second.\n",ticks2-ticks1);
> printf("This value should be the same as CLOCKS_PER_SEC which is %ld.\n",CLOCKS_PER_SEC);
> return 0;
> }
This produces 1000
while(((ticks2-ticks1)/CLOCKS_PER_SEC)<1)
ticks2=clock();
--
Best regards,
Malcolm
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|