sgltk 0.6
Simple OpenGL Tool Kit
Loading...
Searching...
No Matches
timer.h
1#ifndef __TIMER_H__
2#define __TIMER_H__
3
4#include "app.h"
5
6namespace sgltk {
7
12class Timer {
13 std::chrono::high_resolution_clock::time_point start_time;
14public:
15 EXPORT Timer();
16 EXPORT ~Timer();
17
21 EXPORT void start();
26 EXPORT double get_time_s();
31 EXPORT double get_time_ms();
32};
33}
34
35#endif
void start()
Starts the timer.
Definition timer.cpp:12
double get_time_s()
Returns the time in seconds since the timer was started.
Definition timer.cpp:16
double get_time_ms()
Returns the time in milliseconds since the timer was started.
Definition timer.cpp:24