Browse Source

Fixed poll timeout rounding

Paul-Louis Ageneau 3 years ago
parent
commit
0e2579ead4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/impl/pollservice.cpp

+ 1 - 1
src/impl/pollservice.cpp

@@ -176,7 +176,7 @@ void PollService::runLoop() {
 				int timeout;
 				if (next) {
 					auto msecs = duration_cast<milliseconds>(
-					    std::max(clock::duration::zero(), *next - clock::now()));
+					    std::max(clock::duration::zero(), *next - clock::now() + 1ms));
 					PLOG_VERBOSE << "Entering poll, timeout=" << msecs.count() << "ms";
 					timeout = static_cast<int>(msecs.count());
 				} else {