summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/Clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx/Clock.h')
-rw-r--r--StarsEx/Clock.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/StarsEx/Clock.h b/StarsEx/Clock.h
index 4f51330..39e08ac 100644
--- a/StarsEx/Clock.h
+++ b/StarsEx/Clock.h
@@ -8,14 +8,13 @@
#define Clock_h
#include <chrono>
+#include <cstdint>
class Clock
{
public:
using inner_clock = std::chrono::high_resolution_clock;
- using elapsed_duration = std::chrono::milliseconds;
- using count_type = elapsed_duration::rep;
static Clock* GetInstance();
static bool Init();
@@ -30,8 +29,8 @@ public:
double GuiDelta() const;
double Rate() const;
double TimeCompression() const;
- count_type GameTime() const;
- count_type RealTime() const;
+ template <typename R = std::uint32_t> R GameTime() const;
+ template <typename R = std::uint32_t> R RealTime() const;
void SetTimeCompression(double compression);
@@ -51,4 +50,6 @@ private:
};
+#include "Clock.inl"
+
#endif // Clock_h