auto-sync

This commit is contained in:
rusEfi 2014-09-13 20:02:52 -05:00
parent c43fe5f6e1
commit 5464109748
1 changed files with 10 additions and 7 deletions

View File

@ -57,15 +57,18 @@ uint64_t EventQueue::getNextEventTime(uint64_t nowUs) {
return EMPTY_QUEUE; return EMPTY_QUEUE;
} }
if (current->momentUs <= nowUs) { if (current->momentUs <= nowUs) {
//firmwareError("temperror: executeAll should have been called %d/%d", current->momentUs, nowUs); /**
// todo: looks like we end up here after 'writeconfig' (which freezes the firmware) * looks like we end up here after 'writeconfig' (which freezes the firmware) - we are late
// todo: figure this out * for the next scheduled event
continue; */
} uint64_t mock = nowUs + MS2US(10);
efiAssert(current->momentUs > nowUs, "executeAll should have been called", EMPTY_QUEUE); if (mock < result)
result = mock;
} else {
if (current->momentUs < result) if (current->momentUs < result)
result = current->momentUs; result = current->momentUs;
} }
}
return result; return result;
} }