[ILUG] [OT] C time_elapsed function

Kenn Humborg kenn at bluetree.ie
Tue Nov 6 18:18:15 GMT 2001


> Treanor, Ciaran wrote:
> 
> >>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.
> 
> I could use this but:
> 1. It wraps after 472 days
> 2. It's linux specific

Funny...  There was talk on linux-kernel about this recently.

   http://kt.zork.net/kernel-traffic/latest.html#2

Later,
Kenn





More information about the ILUG mailing list