Skip to content

Commit

Permalink
Clarify Timer scheduling return values
Browse files Browse the repository at this point in the history
Be explicit what happens if there are no timers active.
  • Loading branch information
CendioOssman committed Sep 30, 2024
1 parent d29c8ca commit d335af6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/rfb/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ namespace rfb {

// checkTimeouts()
// Dispatches any elapsed Timers, and returns the number of
// milliseconds until the next Timer will timeout.
// milliseconds until the next Timer will timeout. If there are no
// scheduled Timers then -1 is returned.
static int checkTimeouts();

// getNextTimeout()
// Returns the number of milliseconds until the next timeout,
// without dispatching any elapsed Timers.
// without dispatching any elapsed Timers. If there are no
// scheduled Timers then -1 is returned.
static int getNextTimeout();

// Create a Timer with the specified callback handler
Expand Down

0 comments on commit d335af6

Please sign in to comment.