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

Henning Rogge (spam-protected)
Wed Sep 3 18:18:54 CEST 2008


On Wed, Sep 3, 2008 at 18:03, Hannes Gredler <(spam-protected)> wrote:
> by googling abit around it looks like the most portable way
> is to detect overflows manually and use a 64 bit clocktick
> space for timer comparision. (IMO since spreading all timers
> over 256 hash buckets 64-bit timestamp comparision is not
> that expensive).
Why do we need 64 Bit ?

we could just use a function like this to compare two time-values:

int olsr_timer_cmp(olsr_u32_t t1, olsr_u32_t t2) {
   if (t1 == t2)
      return 0;

   if (t1 > t2 && (t1-t2) < (1<<31)) {
       return 1;
   return -1;
}

-- 
"Wo kämen wir hin, wenn alle sagten, wo kämem wir hin, und niemand
ginge, um einmal zu schauen, wohin man käme, wenn man ginge." (Kurt
Marti)




More information about the Olsr-users mailing list