ST_engine
0.3-ALPHA
src
main
main
timer.hpp
1
/* This file is part of the "ST" project.
2
* You may use, distribute or modify this code under the terms
3
* of the GNU General Public License version 2.
4
* See LICENCE.txt in the root directory of the project.
5
*
6
* Author: Maxim Atanasov
7
* E-mail: maxim.atanasov@protonmail.com
8
*/
9
10
#ifndef TIMER_DEF
11
#define TIMER_DEF
12
13
#include <chrono>
14
16
19
class
timer
{
20
private
:
21
std::chrono::time_point<std::chrono::high_resolution_clock> start;
22
public
:
23
timer
();
24
25
[[nodiscard]]
double
time_since_start
()
const
;
26
};
27
28
#endif
//TIMER_DEF
timer
A timer used for keeping track of time in the main loop.
Definition:
timer.hpp:19
timer::time_since_start
double time_since_start() const
Definition:
timer.cpp:22
timer::timer
timer()
Definition:
timer.cpp:15
Generated by
1.9.1