Timer: C++11

This commit is contained in:
Paul Beckingham
2016-02-03 20:14:17 -05:00
parent 8577449960
commit f59e15185f
2 changed files with 9 additions and 22 deletions

View File

@@ -35,10 +35,8 @@ class Timer
{
public:
Timer ();
Timer (const std::string&);
explicit Timer (const std::string&);
~Timer ();
Timer (const Timer&);
Timer& operator= (const Timer&);
void start ();
void stop ();
@@ -48,12 +46,10 @@ public:
static unsigned long now ();
private:
std::string _description;
bool _running;
struct timeval _start;
unsigned long _total;
std::string _description {"-"};
bool _running {false};
struct timeval _start {};
unsigned long _total {0};
};
#endif
////////////////////////////////////////////////////////////////////////////////