[uClibc] clock() for long-running process
Joakim Tjernlund
Joakim.Tjernlund at lumentis.se
Sun May 9 13:41:23 UTC 2004
> mjn3> Besides, you really shouldn't be using clock() to calculate
> mjn3> elapsed cpu time when times() is available. The X/Open System
> mjn3> Interfaces Extension mandates that clock() values be scaled to
> mjn3> millionths of a second, which limits its usefulness on 32 bit
> mjn3> systems for long-running apps.
>
> I agree. But I think there are many programs using two clock() call
> to calclate elapsed time ...
hmm, times() returns a clock_t type which is signed. How
should one use times() to calc. elapsed time?
Just type cast its return value to an unsigned long?
Jocke
More information about the uClibc
mailing list