CubbyFlow v0.71
Core
Utils
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
CubbyFlow::Timer::Timer
Timer()
Constructs the timer and start ticking.
CubbyFlow::Timer::DurationInSeconds
double DurationInSeconds() const
Returns the time duration since the creation or reset in seconds.
CubbyFlow::Timer::Reset
void Reset()
Resets the timer.
CubbyFlow::Timer
Simple timer class.
Definition:
Timer.h:17
CubbyFlow
Definition:
pybind11Utils.h:24
Generated on Sun Apr 22 2018 23:43:24 for CubbyFlow by
1.8.14