mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Use a monotonic timer for the event subsystem.
This commit is contained in:
@@ -200,7 +200,7 @@ sudo_ev_scan_impl(struct sudo_event_base *base, int flags)
|
||||
debug_decl(sudo_ev_loop, SUDO_DEBUG_EVENT)
|
||||
|
||||
if ((ev = TAILQ_FIRST(&base->timeouts)) != NULL) {
|
||||
sudo_gettime_real(&now);
|
||||
sudo_gettime_mono(&now);
|
||||
sudo_timespecsub(&ev->timeout, &now, &ts);
|
||||
if (ts.tv_sec < 0 || (ts.tv_sec == 0 && ts.tv_nsec < 0))
|
||||
sudo_timespecclear(&ts);
|
||||
|
Reference in New Issue
Block a user