Browse Source

neigh_cache: fix: properly convert from nanoseconds to microseconds

Change-Id: I38dc7c04b1fd0e3a17af4c8caef991916f25f2b9
changes/57/28657/1
Vadim Yanitskiy 3 weeks ago
parent
commit
0eaa3d3798
  1. 4
      src/neigh_cache.c

4
src/neigh_cache.c

@ -69,7 +69,7 @@ static void neigh_cache_schedule_cleanup(struct neigh_cache *cache)
} else {
timespecsub(&threshold, &now, &result);
}
osmo_timer_schedule(&cache->cleanup_timer, result.tv_sec, result.tv_nsec*1000);
osmo_timer_schedule(&cache->cleanup_timer, result.tv_sec, result.tv_nsec / 1000);
}
struct neigh_cache *neigh_cache_alloc(void *ctx, unsigned int keep_time_sec)
@ -203,7 +203,7 @@ static void si_cache_schedule_cleanup(struct si_cache *cache)
} else {
timespecsub(&threshold, &now, &result);
}
osmo_timer_schedule(&cache->cleanup_timer, result.tv_sec, result.tv_nsec*1000);
osmo_timer_schedule(&cache->cleanup_timer, result.tv_sec, result.tv_nsec / 1000);
}
struct si_cache *si_cache_alloc(void *ctx, unsigned int keep_time_sec)

Loading…
Cancel
Save