Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
clock.h
1 #pragma once
2 
10 #ifndef CLOCK_H_DEFINED
11 #define CLOCK_H_DEFINED
12 
13 #include "core.h"
14 #include <time.h>
15 
16 namespace rune{
17 
18 class RUNE_ENGINE Clock
19 {
20 private:
21  struct timespec ts;
22  long long startTime;
23  long long lastNanos;
24 
25 public:
27  Clock();
28 
30  long getElapsedTimeAsMilliseconds();
31 
33  void reset();
34 };
35 }
36 
37 #endif
rune
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21
rune::Clock
A clock that can be used to tell how much time has passed.
Definition: clock.h:19