diff options
Diffstat (limited to 'CAN-binder/low-can-binding/utils')
-rw-r--r-- | CAN-binder/low-can-binding/utils/timer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/utils/timer.cpp b/CAN-binder/low-can-binding/utils/timer.cpp index a7ed558c..3d90a007 100644 --- a/CAN-binder/low-can-binding/utils/timer.cpp +++ b/CAN-binder/low-can-binding/utils/timer.cpp @@ -97,7 +97,7 @@ bool frequency_clock_t::elapsed(bool stagger) last_tick_ = get_time_function()() - (rand() % int(period)); // Make sure it ticks the the first call - elapsed_time = !started() ? period : get_time_function()() - last_tick_; + elapsed_time = !started() ? period : (float)get_time_function()() - (float)last_tick_; return frequency_ == 0 || elapsed_time >= period; } |