mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
Simple timer which will time a duration of a scope and checkpoints inside the scope in ros time and std::chrono time. More...
#include <scope_timer.h>
Classes | |
struct | time_point |
Public Member Functions | |
ScopeTimer (const std::string &label, const ros::Duration &throttle_period=ros::Duration(0), const bool enable=true, const std::shared_ptr< ScopeTimerLogger > scope_timer_logger=nullptr) | |
The basic constructor with a user-defined label of the timer, throttled period and file logger. | |
ScopeTimer (const std::string &label, const time_point &tp0, const ros::Duration &throttle_period=ros::Duration(0), const bool enable=true, const std::shared_ptr< ScopeTimerLogger > scope_timer_logger=nullptr) | |
The basic constructor with a user-defined label of the timer and a pre-start time, which will also be measured. | |
ScopeTimer (const std::string &label, const std::shared_ptr< ScopeTimerLogger > scope_timer_logger, const bool enable=true) | |
The basic constructor with a user-defined label of the timer and file logger. | |
void | checkpoint (const std::string &label) |
Checkpoint, prints the time passed until the point this function is called. | |
float | getLifetime () |
Getter for scope timer lifetime. More... | |
~ScopeTimer () | |
The basic destructor which prints out or logs the scope times, if enabled. | |
Simple timer which will time a duration of a scope and checkpoints inside the scope in ros time and std::chrono time.
float mrs_lib::ScopeTimer::getLifetime | ( | ) |
Getter for scope timer lifetime.