Code Review
/
apps
/
low-level-can-service.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix: compile conversion warning
[apps/low-level-can-service.git]
/
CAN-binder
/
low-can-binding
/
utils
/
timer.hpp
diff --git
a/CAN-binder/low-can-binding/utils/timer.hpp
b/CAN-binder/low-can-binding/utils/timer.hpp
index
f565904
..
8ea7476
100644
(file)
--- a/
CAN-binder/low-can-binding/utils/timer.hpp
+++ b/
CAN-binder/low-can-binding/utils/timer.hpp
@@
-17,6
+17,8
@@
#pragma once
#pragma once
+#include <sys/time.h>
+
/// @brief return epoch in milliseconds
///
/// @return long long int epoch in milliseconds
/// @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;
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);
bool started();
time_function_t get_time_function();
bool elapsed(bool stagger);