auto-sync

This commit is contained in:
rusEfi 2014-09-13 14:02:42 -05:00
parent dd5d1462e3
commit 58f75da571
1 changed files with 5 additions and 1 deletions

View File

@ -28,9 +28,13 @@
#if EFI_SIGNAL_EXECUTOR_SLEEP || defined(__DOXYGEN__)
void scheduleTask2(const char *prefix, scheduling_s *scheduling, uint64_t time, schfunc_t callback, void *param) {
scheduleTask(prefix, scheduling, time - getTimeNowUs(), callback, param);
}
void scheduleTask(const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
int delaySt = delayUs * CH_FREQUENCY / 1000000;
if (delaySt == 0) {
if (delaySt <= 0) {
/**
* in case of zero delay, we should invoke the callback
*/