neigh_cache: fix: properly convert from nanoseconds to microseconds

Change-Id: I38dc7c04b1fd0e3a17af4c8caef991916f25f2b9
This commit is contained in:
Vadim Yanitskiy 2022-07-20 00:11:40 +07:00
parent 263c75c912
commit 0eaa3d3798
1 changed files with 2 additions and 2 deletions

View File

@ -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)