ST_engine
0.3-ALPHA
src
main
main
timer.cpp
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
#include <main/timer.hpp>
11
15
timer::timer
() {
16
start = std::chrono::high_resolution_clock::now();
17
}
18
22
double
timer::time_since_start
()
const
{
23
std::chrono::duration<double> elapsed_seconds = std::chrono::high_resolution_clock::now() - start;
24
return
elapsed_seconds.count() * 1000;
25
}
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