mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 17:44:38 +00:00
lib: Return 0 as remaining msec if the thread is not scheduled
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
5f5b29862f
commit
13bcc010e3
@ -756,6 +756,9 @@ unsigned long thread_timer_remain_msec(struct thread *thread)
|
||||
{
|
||||
int64_t remain;
|
||||
|
||||
if (!thread_is_scheduled(thread))
|
||||
return 0;
|
||||
|
||||
frr_with_mutex(&thread->mtx) {
|
||||
remain = monotime_until(&thread->u.sands, NULL) / 1000LL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user