[uClibc] clock() for long-running process
Andrew May
acmay at acmay.homeip.net
Tue May 11 16:07:10 UTC 2004
On Tue, 2004-05-11 at 00:55, Joakim Tjernlund wrote:
> I see, but using CPU time for measuring elapsed time is not very accurate, is it?
> I can only find two way to measure elapsed time in Linux, the return
> value from times()(needs scaling) or gettimeofday(). gettimeofday() has
> the disadvantage that it may change time between polls.
You can try sysinfo to get uptime. It is a bit heavier to get the entire
struct, but it won't jump around like gettimeofday().
More information about the uClibc
mailing list