This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: clock and timing.
- To: opentest at angelfire dot com
- Subject: Re: clock and timing.
- From: "Michael Veksler" <VEKSLER at il dot ibm dot com>
- Date: Mon, 22 Oct 2001 15:31:37 +0300
- Cc: gcc-help at gcc dot gnu dot org
This has nothing to do with gcc. On many systems clock()'s resolution
is only 1/100 of a second. This means that clock() is incremented
every 10,000/CLOCKS_PER_SEC seconds.
"Tom Davids" <opentest@angelfire.com>@gcc.gnu.org on 22-10-2001 06:14:31
> I've just coded up this small program
> [ deleted a program that uses clock() ]
>
> The CLOCKS_PER_SEC is 1000000,
> When I run the program I get the either
> total = 10000
> total = 20000
> or
> total = 0.