Prendendo spunto da un articolo su w3School, creo un conteggio alla rovescia in minuti
<body>
<div id="timer"></div>
<script>
let minute = 1;
let countDownDate = new Date(new Date().getTime() + minute * 60000);
let x = setInterval(function () {
let now = new Date().getTime();
let distance = countDownDate - now;
let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
let seconds = Math.floor((distance % (1000 * 60)) / 1000);
document.getElementById("timer").innerHTML = minutes.toString().padStart(2, "0") + " " + seconds.toString().padStart(2, "0");
if (distance < 0) {
clearInterval(x);
document.getElementById("timer").innerHTML = "00:00"; // tempo scaduto
}
}, 1000);
</script>
</body>