From 76df856e0df1b67770038e657f526f915c11a140 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 16 Mar 2017 17:20:42 +0100 Subject: Implement regular event launching using systemd event loop Regular events is made launch a timerfd event from binder event loop and then in the event handler, reschedule next launch in the future based upon the signal frequency. Change-Id: I0b1e84eb2135474f4bcc5ee256ba513eea4035a6 Signed-off-by: Romain Forlot --- src/utils/timer.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils/timer.hpp') diff --git a/src/utils/timer.hpp b/src/utils/timer.hpp index b58397ba..b34fdf64 100644 --- a/src/utils/timer.hpp +++ b/src/utils/timer.hpp @@ -17,8 +17,6 @@ #pragma once -#include - /* * @brief return epoch in milliseconds * @@ -26,8 +24,9 @@ */ typedef long long int (*time_function_t)(); - +long long int system_time_us(); long long int system_time_ms(); +long long int system_time_s(); /** * @class frequency_clock_t @@ -53,6 +52,7 @@ public: frequency_clock_t(float frequency); frequency_clock_t(float frequency, unsigned long last_tick, time_function_t time_function); + float get_frequency() const; static float frequency_to_period(float frequency); bool started(); time_function_t get_time_function(); -- cgit 1.2.3-korg