Simple timer that can be used to check if a certain amount of time has passed.
More...
#include <time.h>
Simple timer that can be used to check if a certain amount of time has passed.
Definition at line 61 of file time.h.
◆ Timer()
◆ elapsed()
Returns the number of milliseconds elapsed since the set time, or a negative value if the timer hasn't passed.
Due to wrapping, this function is not suitable for measuring long periods of time (tens of days).
Definition at line 65 of file time.cpp.
◆ extend()
Extend the timer by the given number of milliseconds.
Definition at line 94 of file time.h.
◆ isSet()
bool Timer::isSet |
( |
| ) |
const |
|
inline |
Returns whether the timer has been set.
Definition at line 81 of file time.h.
◆ passed()
bool Timer::passed |
( |
| ) |
const |
|
inline |
Returns whether the timer has passed.
A timer that wasn't set will always return true.
Definition at line 88 of file time.h.
◆ reset()
Reset the timer.
Definition at line 75 of file time.h.
◆ set()
Sets the timer with an optional duration in milliseconds.
Definition at line 69 of file time.h.
◆ mTimeout
The documentation for this class was generated from the following files: