LydiaSyft
Stopwatch.h
1 #ifndef STOPWATCH_H
2 #define STOPWATCH_H
3 
4 #include <chrono>
5 
6 namespace Syft {
7 
11 class Stopwatch {
12  private:
13 
14  bool is_started_;
15  std::chrono::high_resolution_clock::time_point start_time_;
16 
17  public:
18 
22  Stopwatch();
23 
27  void start();
28 
37  std::chrono::milliseconds stop();
38 
39 };
40 
41 }
42 
43 #endif // STOPWATCH_H
Stopwatch for timing executions.
Definition: Stopwatch.h:11
std::chrono::milliseconds stop()
Stop the stopwatch.
Definition: Stopwatch.cpp:16
Stopwatch()
Create a stopwatch without starting it.
Definition: Stopwatch.cpp:7
void start()
Start the stopwatch.
Definition: Stopwatch.cpp:11