Small helper class that prints its lifetime when destroyed.
More...
#include <Utils.h>
|
| Timer (std::string text="") |
| Constructor, with some identifying text.
|
|
|
double | m_startTime |
| time at start (in ns).
|
|
std::string | m_text |
| identifying text (printed at end).
|
|
Small helper class that prints its lifetime when destroyed.
Definition at line 79 of file Utils.h.
◆ Timer()
Timer |
( |
std::string | text = "" | ) |
|
|
explicit |
Constructor, with some identifying text.
Definition at line 93 of file Utils.cc.
93 :
95 m_text(std::move(text))
96 { }
double getClock()
Return current value of the real-time clock.
◆ ~Timer()
Definition at line 98 of file Utils.cc.
99 {
101 B2INFO(m_text << " " << std::fixed << std::setprecision(3) << elapsed << " ms");
102 }
static const double ms
[millisecond]
◆ m_startTime
time at start (in ns).
Definition at line 85 of file Utils.h.
◆ m_text
identifying text (printed at end).
Definition at line 86 of file Utils.h.
The documentation for this class was generated from the following files: