Fix: compile conversion warning
[apps/low-level-can-service.git] / CAN-binder / low-can-binding / utils / timer.hpp
index f565904..8ea7476 100644 (file)
@@ -17,6 +17,8 @@
 
 #pragma once
 
+#include <sys/time.h>
+
 /// @brief return epoch in milliseconds
 ///
 /// @return long long int epoch in milliseconds
@@ -43,8 +45,9 @@ 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();
+       float frequency_to_period() const;
        bool started();
        time_function_t get_time_function();
        bool elapsed(bool stagger);