only: migrating to Timer API

This commit is contained in:
rusefi 2024-04-25 18:51:35 -04:00
parent d66b752173
commit 9932330bca
1 changed files with 4 additions and 2 deletions

View File

@ -357,7 +357,9 @@ static void sendResponseCode(ts_response_format_e mode, TsChannelBase *tsChannel
* 'Burn' command is a command to commit the changes
*/
static void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mode) {
efitimems_t nowMs = getTimeNowMs();
Timer t;
t.reset();
tsState.burnCommandCounter++;
efiPrintf("got B (Burn) %s", mode == TS_PLAIN ? "plain" : "CRC");
@ -368,7 +370,7 @@ static void handleBurnCommand(TsChannelBase* tsChannel, ts_response_format_e mod
}
sendResponseCode(mode, tsChannel, TS_RESPONSE_BURN_OK);
efiPrintf("BURN in %dms", getTimeNowMs() - nowMs);
efiPrintf("BURN in %dms", (int)(t.getElapsedSeconds() * 1e3));
}
#if (EFI_PROD_CODE || EFI_SIMULATOR)