A sparse MPC solver for walking motion generation.
Public Member Functions | Private Attributes | List of all members
oruw_timer Class Reference

Log time of existance on destruction. Throw an error, if the given upper limit is not satisfied. More...

#include <oruw_timer.h>

Public Member Functions

 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...
 

Private Attributes

qi::os::timeval end_time
 
qi::os::timeval start_time
 
const char * id
 
double limit
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ oruw_timer()

oruw_timer::oruw_timer ( const char *  timer_id,
const unsigned int  timer_limit_ms 
)
inline

Create a timer.

Parameters
[in]timer_ididentifier of the timer
[in]timer_limit_msthe upper limit

Definition at line 29 of file oruw_timer.h.

Member Function Documentation

◆ 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.

Member Data Documentation

◆ end_time

qi::os::timeval oruw_timer::end_time
private

Definition at line 61 of file oruw_timer.h.

◆ id

const char* oruw_timer::id
private

Definition at line 64 of file oruw_timer.h.

◆ limit

double oruw_timer::limit
private

Definition at line 65 of file oruw_timer.h.

◆ start_time

qi::os::timeval oruw_timer::start_time
private

Definition at line 62 of file oruw_timer.h.


The documentation for this class was generated from the following file: