potentially fixed the 'result data does not make sense' error

This commit is contained in:
Miodec 2021-03-13 02:36:01 +00:00
parent 85ee735d22
commit d239074600
2 changed files with 14 additions and 0 deletions

View file

@ -2681,6 +2681,7 @@ function startTest() {
}
testActive = true;
TestStats.setStart(performance.now());
TestStats.resetKeypressTimings();
restartTimer();
showTimer();
$("#liveWpm").text("0");

View file

@ -180,6 +180,19 @@ export function setKeypressSpacing(val) {
keypressTimings.spacing.current = val;
}
export function resetKeypressTimings() {
keypressTimings = {
spacing: {
current: -1,
array: [],
},
duration: {
current: -1,
array: [],
},
};
}
export function pushMissedWord(word) {
if (!Object.keys(missedWords).includes(word)) {
missedWords[word] = 1;