> 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.