Timer.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: Timer.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Simple timer class.
6 > Created Time: 2017/04/19
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_TIMER_H
10 #define CUBBYFLOW_TIMER_H
11 
12 #include <chrono>
13 
14 namespace CubbyFlow
15 {
17  class Timer
18  {
19  public:
21  Timer();
22 
24  double DurationInSeconds() const;
25 
27  void Reset();
28 
29  private:
30  std::chrono::steady_clock m_clock;
31  std::chrono::steady_clock::time_point m_startingPoint;
32  };
33 }
34 
35 #endif
Timer()
Constructs the timer and start ticking.
double DurationInSeconds() const
Returns the time duration since the creation or reset in seconds.
void Reset()
Resets the timer.
Simple timer class.
Definition: Timer.h:17
Definition: pybind11Utils.h:24