Skip to content

Commit 7a637e6

Browse files
committed
event/Loop: update statistics even if there is no timeout
Fixes mistake of commit d06c6ac - a negative timeout means "no timeout at all, wait forever", and only zero means "don't block, we still have work to do".
1 parent 1fcc34b commit 7a637e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/event/Loop.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ EventLoop::Run() noexcept
566566
Wait(timeout);
567567

568568
#ifdef ENABLE_EVENT_LOOP_STATS
569-
if (timeout.count() > 0) {
569+
if (timeout.count() != 0) {
570570
FlushClockCaches();
571571
const auto now = SteadyNow();
572572
stats.idle_duration += now - idle_since;

0 commit comments

Comments
 (0)