mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
calculating the time earlier
This commit is contained in:
parent
8d4fdc6b9a
commit
dc6d23ac31
|
@ -1516,13 +1516,13 @@ function countChars() {
|
|||
}
|
||||
|
||||
function calculateStats() {
|
||||
let testSeconds = roundTo2((testEnd - testStart) / 1000);
|
||||
|
||||
// if (config.mode == "words" && config.difficulty == "normal") {
|
||||
// if (inputHistory.length != wordsList.length) return;
|
||||
// }
|
||||
let chars = countChars();
|
||||
|
||||
// let testNow = Date.now();
|
||||
let testSeconds = roundTo2((testEnd - testStart) / 1000);
|
||||
let wpm = roundTo2(
|
||||
((chars.correctWordChars + chars.correctSpaces) * (60 / testSeconds)) / 5
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue