mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
made sure time doesnt reset when it reaches 24 hours
This commit is contained in:
parent
63720953b3
commit
6cb432fa44
1 changed files with 17 additions and 10 deletions
|
@ -1024,16 +1024,23 @@ function refreshAccountPage() {
|
|||
$(".pageAccount .triplegroup.stats").removeClass("hidden");
|
||||
}
|
||||
|
||||
$(".pageAccount .timeTotal .val").text(
|
||||
moment
|
||||
.utc(moment.duration(totalSeconds, "seconds").asMilliseconds())
|
||||
.format("HH:mm:ss")
|
||||
);
|
||||
$(".pageAccount .timeTotalFiltered .val").text(
|
||||
moment
|
||||
.utc(moment.duration(totalSecondsFiltered, "seconds").asMilliseconds())
|
||||
.format("HH:mm:ss")
|
||||
);
|
||||
// moment
|
||||
// .utc(moment.duration(totalSeconds, "seconds").asMilliseconds())
|
||||
// .format("HH:mm:ss")
|
||||
$(".pageAccount .timeTotal .val").text(`
|
||||
|
||||
${Math.floor(totalSeconds / 3600)}:${Math.floor(
|
||||
(totalSeconds % 3600) / 60
|
||||
)}:${Math.floor((totalSeconds % 3600) % 60)}
|
||||
`);
|
||||
//moment
|
||||
// .utc(moment.duration(totalSecondsFiltered, "seconds").asMilliseconds())
|
||||
// .format("HH:mm:ss")
|
||||
$(".pageAccount .timeTotalFiltered .val").text(`
|
||||
${Math.floor(totalSeconds / 3600)}:${Math.floor(
|
||||
(totalSeconds % 3600) / 60
|
||||
)}:${Math.floor((totalSeconds % 3600) % 60)}
|
||||
`);
|
||||
|
||||
$(".pageAccount .highestWpm .val").text(topWpm);
|
||||
$(".pageAccount .averageWpm .val").text(Math.round(totalWpm / testCount));
|
||||
|
|
Loading…
Reference in a new issue