X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Ftimer.hpp;h=7d0e466915b379c2d2ea72078e0d81eccc3af511;hb=f9d6b3b462fa3db5a70e8bd1e1625d35f9e0f21b;hp=76eb51dfab7883c2ef292500ad4b4db0b36d2aca;hpb=860d6bd4a829ee5aca50b93122474c9bf68fff9d;p=apps%2Flow-level-can-service.git diff --git a/src/timer.hpp b/src/timer.hpp index 76eb51d..7d0e466 100644 --- a/src/timer.hpp +++ b/src/timer.hpp @@ -17,17 +17,29 @@ #pragma once -//typedef unsigned long (*TimeFunction)(); +#include -/* Public: A frequency counting clock. +/* + * @brief return epoch in milliseconds + * + * @return long long int epoch in milliseconds + */ +typedef long long int (*TimeFunction)(); + +/** + * @struct FrequencyClock + * @brief A frequency counting clock. * - * frequency - the clock frequency in Hz. - * last_time - the last time (in milliseconds since startup) that the clock + * @var FrequencyClock::frequency + * the clock frequency in Hz. + * @var FrequencyClock::last_time + * the last time (in milliseconds since startup) that the clock * ticked. - * time_function - a function returning current time in ms + * @var FrequencyClock::time_function + * a function returning current time */ typedef struct { float frequency; unsigned long lastTick; TimeFunction timeFunction; -} FrequencyClock; +} FrequencyClock; \ No newline at end of file