This is the mail archive of the
mailing list for the GCC project.
clock() function problem.
- From: DOBLEJ1 <DOBLEJ at teleline dot es>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "gcc at gnu dot org" <gcc at gnu dot org>
- Date: Wed, 14 Aug 2002 16:16:59 +0000
- Subject: clock() function problem.
- Organization: DAYCOM
The clock() function call does what we want, but with one serious
side effect: It rolls over after 2147 seconds. This is less
than the CPU times we expect to measure. It also does not roll over to
zero, but starts _descending_ after it rolls
over. Does anyone know how to reset clock() so that it starts from zero
again, or better yet, a simple, clean way of measuring
large amounts of process CPU time?
Thanks in advanced.