Microsecond is 10^(-6)s, not 10^(-9)s
This commit is contained in:
parent
995c7b4634
commit
d437ae0ecf
|
@ -86,7 +86,7 @@ void EventManager::handle_next_events(EventMode mode)
|
|||
using namespace std::chrono;
|
||||
auto timeout = duration_cast<microseconds>(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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user