04-25-04 09:35 PM
hi all
i'm using the the times() and clock() functions and i'm a little
confused:
struct tms tops;
clock_t tact;
tact = times(&tops);
printf("%g\n",(double)clock()/CLOCKS_PER_SEC);
printf("%g\n",(double)tact/CLOCKS_PER_SEC);
printf("%g\n",(double)tops.tms_utime/CLOCKS_PER_SEC);
printf("%g\n",(double)tops.tms_stime/CLOCKS_PER_SEC);
and i get the following:
6.79
9.6803
0.000675
4e-06
it is not suposed the return values of times() and clock are the same?
what are the units of tms_utime and tms_stime?
( tms_utime*10000 + tms_stime*10000 = cloc() ?)
thanks
--
Alex Lorca
[ Post a follow-up to this message ]
|