mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
tweaked afk calculation
This commit is contained in:
parent
80ef2744e1
commit
c585e943b7
1 changed files with 3 additions and 1 deletions
|
|
@ -1652,6 +1652,7 @@ function showCrown() {
|
|||
function failTest() {
|
||||
inputHistory.push(currentInput);
|
||||
correctedHistory.push(currentCorrected);
|
||||
TestStats.pushKeypressesToHistory();
|
||||
TestStats.setLastSecondNotRound();
|
||||
showResult(true);
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
|
|
@ -2051,7 +2052,7 @@ function showResult(difficultyFailed = false) {
|
|||
timestamp: Date.now(),
|
||||
language: lang,
|
||||
restartCount: TestStats.restartCount,
|
||||
incompleteTestSeconds: TestStats.incompleteSeconds,
|
||||
incompleteTestSeconds: Misc.roundTo2(TestStats.incompleteSeconds),
|
||||
difficulty: config.difficulty,
|
||||
testDuration: testtime,
|
||||
afkDuration: afkseconds,
|
||||
|
|
@ -2853,6 +2854,7 @@ function restartTest(withSameWordset = false, nosave = false, event) {
|
|||
}
|
||||
|
||||
if (testActive) {
|
||||
TestStats.pushKeypressesToHistory();
|
||||
let testSeconds = TestStats.calculateTestSeconds(performance.now());
|
||||
let afkseconds = TestStats.calculateAfkSeconds();
|
||||
// incompleteTestSeconds += ;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue