[Olsr-users] 0.5.6 Routes disappear after 4 mins of uptime, then all OK - suspect clock sync
Juliusz Chroboczek
(spam-protected)
Thu Sep 11 23:50:56 CEST 2008
> For timeouts in select/poll/sleep/timers in general one wants
> a steady clock without jumps. And times(2) is the only portable
> sys-call I know of. BTW do we have requirements on precision?
In Babel, I use clock_gettime(CLOCK_MONOTONIC) if it's available
(Linux 2.6, FreeBSD 5 and later, OS X 10.4 and later). If it isn't,
I fall back to gettimeofday, with some code to detect clock stepping
and recover gracefully.
Juliusz
More information about the Olsr-users
mailing list