aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/utils/timer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding/utils/timer.hpp')
-rw-r--r--CAN-binder/low-can-binding/utils/timer.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/utils/timer.hpp b/CAN-binder/low-can-binding/utils/timer.hpp
index f565904..d3fedbd 100644
--- a/CAN-binder/low-can-binding/utils/timer.hpp
+++ b/CAN-binder/low-can-binding/utils/timer.hpp
@@ -17,6 +17,8 @@
#pragma once
+#include <sys/time.h>
+
/// @brief return epoch in milliseconds
///
/// @return long long int epoch in milliseconds
@@ -43,6 +45,7 @@ public:
frequency_clock_t(float frequency, unsigned long last_tick, time_function_t time_function);
float get_frequency() const;
+ const struct timeval get_timeval_from_period() const;
float frequency_to_period();
bool started();