Change-Id: I174c546afb6b21df431e0a61677292d43af8f0ca
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
last_tick_ = get_time_function()() - (rand() % int(period));
// Make sure it ticks the the first call
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;
}
return frequency_ == 0 || elapsed_time >= period;
}