Show decimals in popup

This commit is contained in:
Ajay Ramachandran 2021-02-14 14:27:59 -05:00
parent d1a7209d69
commit e3b0be23a7

View file

@ -598,8 +598,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
//converts time in seconds to minutes:seconds
function getFormattedTime(seconds) {
const minutes = Math.floor(seconds / 60);
const secondsDisplayNumber = Math.floor(seconds - minutes * 60);
let secondsDisplay = String(secondsDisplayNumber);
const secondsDisplayNumber = seconds - minutes * 60;
let secondsDisplay = secondsDisplayNumber.toFixed(3);
if (secondsDisplayNumber < 10) {
//add a zero
secondsDisplay = "0" + secondsDisplay;