From d437ae0ecfdccbbbbb79e4b21f2dc7336981982f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 3 Dec 2014 18:57:33 +0000 Subject: [PATCH] Microsecond is 10^(-6)s, not 10^(-9)s --- src/event_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event_manager.cc b/src/event_manager.cc index 7596b47ff..2c77e144a 100644 --- a/src/event_manager.cc +++ b/src/event_manager.cc @@ -86,7 +86,7 @@ void EventManager::handle_next_events(EventMode mode) using namespace std::chrono; auto timeout = duration_cast(next_timer - Clock::now()).count(); - constexpr auto us = 1000000000ll; + constexpr auto us = 1000000; timeval tv{ (time_t)(timeout / us), (suseconds_t)(timeout % us) }; int res = select(max_fd + 1, &rfds, nullptr, nullptr, &tv);