#include <chronometer.h>
|
| template<typename T > |
| std::string | measure (const std::string str) |
| |
|
| const int | nb |
| |
| std::chrono::time_point< std::chrono::high_resolution_clock > | start |
| |
| std::chrono::time_point< std::chrono::high_resolution_clock > | end |
| |
convenient class to measure durations in ms or µs. Constructor is initialized with a starting value. Then each successive calls to millis() or micros() are measuring the elapsed time since last call. The chronometer can be reset calling reset()
◆ chronometer() [1/2]
| chronometer::chronometer |
( |
| ) |
|
|
inline |
default constructor, 0 digit after comma
◆ chronometer() [2/2]
| chronometer::chronometer |
( |
const int |
_nb | ) |
|
|
inline |
constructor, nb is the number of digit after comma
◆ convertSeconds()
| std::string chronometer::convertSeconds |
( |
double |
d | ) |
|
|
inline |
stringify number of seconds
◆ fp_elapsed()
| double chronometer::fp_elapsed |
( |
| ) |
|
|
inline |
returns number of elapsed seconds since last call in double precision
◆ measure()
template<typename T >
| std::string chronometer::measure |
( |
const std::string |
str | ) |
|
|
inlineprivate |
template function that measure elapsed time since last call
◆ micros()
| std::string chronometer::micros |
( |
| ) |
|
|
inline |
elapsed time since last call in microseconds
◆ millis()
| std::string chronometer::millis |
( |
| ) |
|
|
inline |
elapsed time since last call in milliseconds
◆ reset()
| void chronometer::reset |
( |
void |
| ) |
|
|
inline |
◆ end
| std::chrono::time_point<std::chrono::high_resolution_clock> chronometer::end |
|
private |
◆ nb
| const int chronometer::nb |
|
private |
number of digit after comma
◆ start
| std::chrono::time_point<std::chrono::high_resolution_clock> chronometer::start |
|
private |
The documentation for this class was generated from the following file: