1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 14:25:14 +03:00

feat: use console.time in all places

Remove `microtime` and console log in favour of `console.time`
This commit is contained in:
Tomas Chmelevskij 2021-02-14 07:25:19 +01:00
parent cb0d9f3a66
commit 934e648e18
3 changed files with 6 additions and 7 deletions

View file

@ -86,8 +86,10 @@ function generateData(firmware, input, startAddress) {
firmware.bytes_total += input.length;
}
const CONFIG_LABEL = `Custom defaults inserted in`;
ConfigInserter.prototype.insertConfig = function (firmware, input) {
const timeParsingStart = microtime(); // track time
console.time(CONFIG_LABEL);
const customDefaultsArea = getCustomDefaultsArea(firmware);
@ -99,7 +101,7 @@ ConfigInserter.prototype.insertConfig = function (firmware, input) {
generateData(firmware, input, customDefaultsArea.startAddress);
console.log(`Custom defaults inserted in: ${microtime() - timeParsingStart.toFixed(4)} seconds.`);
console.timeEnd(CONFIG_LABEL);
return true;
}