#include <nimble_timer.h>
◆ TimeKeeper()
nimble::TimeKeeper::TimeKeeper |
( |
| ) |
|
|
inline |
◆ GetElapsedTime()
double nimble::TimeKeeper::GetElapsedTime |
( |
| ) |
const |
|
inline |
86 {
87 return total_time_;
88 }
◆ Start()
void nimble::TimeKeeper::Start |
( |
| ) |
|
|
inline |
69 {
70 start_time_ = std::chrono::high_resolution_clock::now();
71 }
◆ Stop()
void nimble::TimeKeeper::Stop |
( |
| ) |
|
|
inline |
75 {
76 using std::chrono::duration;
77 using std::chrono::duration_cast;
78 end_time_ = std::chrono::high_resolution_clock::now();
79 std::chrono::duration<double> time_increment(0.0);
80 if (end_time_ > start_time_) { time_increment = duration_cast<duration<double>>(end_time_ - start_time_); }
81 total_time_ += time_increment.count();
82 }
The documentation for this class was generated from the following file: