[ILUG] [OT] C time_elapsed function

Treanor, Ciaran ciaran at xelector.com
Tue Nov 6 18:06:34 GMT 2001


> Note time() and gettimeofday() both return seconds since 1970,
> and hence won't do as the value returned isn't guaranteed to
> monotonically increase (as the system date can change).

There ain't nothing you can do about that.

Have you looked at /proc/uptime ? It gives the time in seconds
since the last boot.

Ciaran T.




More information about the ILUG mailing list