24 using namespace std::chrono;
25 auto stop = ClockType::now();
26 auto duration = (
stop - start_);
27 auto ms = duration_cast<milliseconds>(duration).count();
28 std::cout << ms <<
" ms " << function_ <<
'\n';
32 const char *function_ = {};
33 const ClockType::time_point start_ = {};
Timer to printout scope execution time in milliseconds.
Definition: scoped_timer.h:8
ScopedTimer(const char *func)
Initialise a new instance of the ScopedTimer class.
Definition: scoped_timer.h:15
auto operator=(const ScopedTimer &) -> ScopedTimer &=delete
ScopedTimer(ScopedTimer &&)=delete
~ScopedTimer()
Destroys the ScopedTimer instance, printout lifetime duration.
Definition: scoped_timer.h:23
std::chrono::steady_clock ClockType
The time measuring clock.
Definition: scoped_timer.h:11
auto operator=(ScopedTimer &&) -> ScopedTimer &=delete
ScopedTimer(const ScopedTimer &)=delete
Top-level namespace for Health-GPS Core C++ API.
Definition: analysis.h:7
@ stop
Simulation has stopped, time = end.