X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Futils%2Ftimer.hpp;h=8ea747685c3a20520f3824fb246d71a1f6e2611e;hb=5d96c27e2679e37bd7354d3c618a4fc3111f137c;hp=f565904482b263995093372e698d16e68bbfa4c0;hpb=0242c26c2f5dc96387bca7efb118364c800f4ee7;p=apps%2Flow-level-can-service.git diff --git a/CAN-binder/low-can-binding/utils/timer.hpp b/CAN-binder/low-can-binding/utils/timer.hpp index f565904..8ea7476 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 + /// @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);