require explicit initialization to point devs toward empty timer names
This commit is contained in:
@@ -11,7 +11,7 @@ namespace util {
|
||||
class timer {
|
||||
using hr = std::chrono::high_resolution_clock;
|
||||
public:
|
||||
timer(const std::string &name) : name(name), start(hr::now()) {}
|
||||
explicit timer(const std::string &name) : name(name), start(hr::now()) {}
|
||||
~timer() {
|
||||
using namespace std::chrono;
|
||||
std::cerr << name << ": "
|
||||
|
||||
Reference in New Issue
Block a user