Kemena3D
Loading...
Searching...
No Matches
ktimer.h
Go to the documentation of this file.
1
5
6#ifndef KTIMER_H
7#define KTIMER_H
8
9#include "kexport.h"
10
11#include <chrono>
12
13namespace kemena
14{
22 {
23 public:
28
34 void tick();
35
40 float getDeltaTime();
41
42 protected:
43 private:
44 float deltaTime;
45 std::chrono::system_clock::time_point then;
46 };
47}
48
49#endif // KTIMER_H
kTimer()
Constructs the timer and initialises its internal reference timestamp.
float getDeltaTime()
Returns the elapsed time (in seconds) between the last two tick() calls.
void tick()
Records the current time and computes the delta since the last tick.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Top-level Kemena3D engine namespace.
Definition kanimation.h:23