[Olsr-users] 0.5.6 Routes disappear after 4 mins of uptime, then all OK - suspect clock sync

Hannes Gredler (spam-protected)
Tue Sep 2 16:40:16 CEST 2008


On Tue, Sep 02, 2008 at 04:10:57PM +0200, Bernd Petrovitsch wrote:
| One should probably use something like:
| ----  snip  ----
| unsigned long sane_times(void)
| {
|   struct tms tms_buf;
|   const long t = times(&tms_buf);
|   return t < 0 ? -errno : t;
| }
| ----  snip  ----
| The unused "tms_buf" is there since some BSD doesn't like it if one
| passes NULL there (IIRC).
| 
| Hmm, one should review all the times(2) calls though ....

does not appear to be that bad ...

(spam-protected):~/dev/olsrd$ grep -R "times(" *
src/main.c:  now_times = times(&tms_buf);
src/scheduler.c:    now_times = times(&tms_buf);
src/scheduler.c:    olsr_scheduler_sleep(times(&tms_buf) - now_times);
src/socket_parser.c:  now_times = times(&tms_buf);




More information about the Olsr-users mailing list