Skip to content

Commit

Permalink
Maintenance: Fix EventScheduler::timeRemaining() comment (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
rousskov authored and squid-anubis committed Oct 15, 2024
1 parent 2abc8be commit 6c33c64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ EventScheduler::timeRemaining() const
if (tasks->when <= current_dtime) // we are on time or late
return 0; // fire the event ASAP

const double diff = tasks->when - current_dtime; // microseconds
const double diff = tasks->when - current_dtime; // seconds
// Round UP: If we come back a nanosecond earlier, we will wait again!
const int timeLeft = static_cast<int>(ceil(1000*diff)); // milliseconds
// Avoid hot idle: A series of rapid select() calls with zero timeout.
Expand Down

0 comments on commit 6c33c64

Please sign in to comment.