LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Stopwatch.h
1 #ifndef RHESUS_STOPWATCH_H_
2 #define RHESUS_STOPWATCH_H_
3 
4 #include <Timer.h>
5 
6 #include "../TimeSpan.h"
7 
8 namespace Rhesus
9 {
10 namespace Toolkit
11 {
12 namespace Diagnostics
13 {
14  class Stopwatch
15  {
16  public:
17  Stopwatch();
18 
19  void Start();
20  void Stop();
21  void Restart();
22  void Reset();
23 
24  bool Running();
25 
26  double TotalElapsedMinutes();
27  double TotalElapsedSeconds();
28  double TotalElapsedMilliseconds();
29 
30  Rhesus::Toolkit::TimeSpan TotalElapsedTime();
31  private:
32  double m_begin;
33  double m_end;
34 
35  double m_totalTime;
36 
37  bool m_stopped;
38  };
39 }
40 }
41 }
42 
43 #endif