aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/timer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/timer.hpp')
-rw-r--r--src/utils/timer.hpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/utils/timer.hpp b/src/utils/timer.hpp
index b34fdf64..5be0e3cd 100644
--- a/src/utils/timer.hpp
+++ b/src/utils/timer.hpp
@@ -17,35 +17,24 @@
#pragma once
-/*
- * @brief return epoch in milliseconds
- *
- * @return long long int epoch in milliseconds
- */
+/// @brief return epoch in milliseconds
+///
+/// @return long long int epoch in milliseconds
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
- * @brief A frequency counting clock.
- *
- * @var frequency_clock_t::frequency
- * the clock frequency in Hz.
- * @var frequency_clock_t::last_time
- * the last time (in milliseconds since startup) that the clock
- * ticked.
- * @var frequency_clock_t::time_function
- * a function returning current time
- */
+
+/// @brief A frequency counting clock.
+/// Utility class allowing some time function.
class frequency_clock_t
{
private:
- float frequency_;
- unsigned long last_tick_;
- time_function_t time_function_;
+ float frequency_; ///< the clock frequency in Hz.
+ unsigned long last_tick_; ///< the last time (in milliseconds since startup) that the clock ticked.
+ time_function_t time_function_; ///< a function returning current time
public:
frequency_clock_t();