require explicit initialization to point devs toward empty timer names

This commit is contained in:
Konstantin Käfer
2014-04-25 16:14:15 +02:00
parent 3e92f36afc
commit 3d69e38a1c

View File

@@ -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 << ": "