From 58f75da571a695396534dbffa131c4eade6d533a Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 13 Sep 2014 14:02:42 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/system/signal_executor_sleep.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/system/signal_executor_sleep.c b/firmware/controllers/system/signal_executor_sleep.c index 4d67c31d49..abd856ad1b 100644 --- a/firmware/controllers/system/signal_executor_sleep.c +++ b/firmware/controllers/system/signal_executor_sleep.c @@ -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 */