aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/system/Clock.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/system/Clock.hpp')
-rw-r--r--include/mglpp/system/Clock.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/mglpp/system/Clock.hpp b/include/mglpp/system/Clock.hpp
new file mode 100644
index 0000000..0c24471
--- /dev/null
+++ b/include/mglpp/system/Clock.hpp
@@ -0,0 +1,21 @@
+#ifndef MGLPP_CLOCK_HPP
+#define MGLPP_CLOCK_HPP
+
+extern "C" {
+#include <mgl/system/clock.h>
+}
+
+namespace mgl {
+ class Clock {
+ public:
+ Clock();
+
+ /* Returns the elapsed time in seconds since the last restart or init, before resetting the clock */
+ double restart();
+ double get_elapsed_time_seconds();
+ private:
+ mgl_clock clock;
+ };
+}
+
+#endif /* MGLPP_CLOCK_HPP */