Log time of existance on destruction. Throw an error, if the given upper limit is not satisfied.
More...
#include <oruw_timer.h>
|
| oruw_timer (const char *timer_id, const unsigned int timer_limit_ms) |
| Create a timer. More...
|
|
void | reset () |
| Reset timer to the current time. More...
|
|
bool | check () |
| Checks if the limit is satisfied, logs a message. More...
|
|
Log time of existance on destruction. Throw an error, if the given upper limit is not satisfied.
Definition at line 20 of file oruw_timer.h.
◆ oruw_timer()
oruw_timer::oruw_timer |
( |
const char * |
timer_id, |
|
|
const unsigned int |
timer_limit_ms |
|
) |
| |
|
inline |
Create a timer.
- Parameters
-
[in] | timer_id | identifier of the timer |
[in] | timer_limit_ms | the upper limit |
Definition at line 29 of file oruw_timer.h.
◆ check()
bool oruw_timer::check |
( |
| ) |
|
|
inline |
Checks if the limit is satisfied, logs a message.
- Returns
- true if the limit is satisfied, false otherwise.
Definition at line 50 of file oruw_timer.h.
◆ reset()
void oruw_timer::reset |
( |
| ) |
|
|
inline |
Reset timer to the current time.
Definition at line 39 of file oruw_timer.h.
◆ end_time
qi::os::timeval oruw_timer::end_time |
|
private |
◆ id
const char* oruw_timer::id |
|
private |
◆ limit
◆ start_time
qi::os::timeval oruw_timer::start_time |
|
private |
The documentation for this class was generated from the following file: