mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
feat: use console.time
for timing
This commit is contained in:
parent
dfbd46c6f1
commit
cb0d9f3a66
1 changed files with 4 additions and 3 deletions
|
@ -93,13 +93,14 @@ function read_hex_file(data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TIME_LABEL = 'HEX_PARSER - File parsed in';
|
||||||
|
|
||||||
onmessage = function(event) {
|
onmessage = function(event) {
|
||||||
const timeParsingStart = microtime(); // track time
|
console.time(TIME_LABEL)
|
||||||
|
|
||||||
read_hex_file(event.data);
|
read_hex_file(event.data);
|
||||||
|
|
||||||
console.log(`HEX_PARSER - File parsed in: ${(microtime() - timeParsingStart).toFixed(4)} seconds`);
|
|
||||||
|
|
||||||
// terminate worker
|
// terminate worker
|
||||||
|
console.timeEnd(TIME_LABEL);
|
||||||
close();
|
close();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue