summaryrefslogtreecommitdiffstats
path: root/src/utils/timer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/timer.hpp')
-rw-r--r--src/utils/timer.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/utils/timer.hpp b/src/utils/timer.hpp
index a3cbecd6..8037b85d 100644
--- a/src/utils/timer.hpp
+++ b/src/utils/timer.hpp
@@ -24,7 +24,10 @@
*
* @return long long int epoch in milliseconds
*/
-typedef long long int (*TimeFunction)();
+typedef long long int (*time_function_t)();
+
+
+long long int system_time_ms();
/**
* @class frequency_clock_t
@@ -43,8 +46,14 @@ class frequency_clock_t
private:
float frequency_;
unsigned long last_tick_;
- TimeFunction time_function_;
+ time_function_t time_function_;
public:
frequency_clock_t();
+ frequency_clock_t(float frequency);
+
+ static float frequency_to_period(float frequency);
+ bool started();
+ time_function_t get_time_function();
+ bool elapsed(bool stagger);
}; \ No newline at end of file