mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
cf2527269f
commit
73d87073af
@ -154,7 +154,11 @@ struct Timer_queue : public Qemu::Timer_queue
|
|||||||
if (TMTimerIsActive(tm_timer))
|
if (TMTimerIsActive(tm_timer))
|
||||||
TMTimerStop(tm_timer);
|
TMTimerStop(tm_timer);
|
||||||
|
|
||||||
TMTimerSetNano(tm_timer, min->timeout_abs_ns - TMTimerGetNano(tm_timer));
|
uint64_t const now = TMTimerGetNano(tm_timer);
|
||||||
|
if (min->timeout_abs_ns < now)
|
||||||
|
TMTimerSetNano(tm_timer, 0);
|
||||||
|
else
|
||||||
|
TMTimerSetNano(tm_timer, min->timeout_abs_ns - now);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _deactivate_timer(void *qtimer)
|
void _deactivate_timer(void *qtimer)
|
||||||
|
@ -160,7 +160,11 @@ struct Timer_queue : public Qemu::Timer_queue
|
|||||||
if (TMTimerIsActive(tm_timer))
|
if (TMTimerIsActive(tm_timer))
|
||||||
TMTimerStop(tm_timer);
|
TMTimerStop(tm_timer);
|
||||||
|
|
||||||
TMTimerSetNano(tm_timer, min->timeout_abs_ns - TMTimerGetNano(tm_timer));
|
uint64_t const now = TMTimerGetNano(tm_timer);
|
||||||
|
if (min->timeout_abs_ns < now)
|
||||||
|
TMTimerSetNano(tm_timer, 0);
|
||||||
|
else
|
||||||
|
TMTimerSetNano(tm_timer, min->timeout_abs_ns - now);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _deactivate_timer(void *qtimer)
|
void _deactivate_timer(void *qtimer)
|
||||||
|
Loading…
Reference in New Issue
Block a user