JSFiddle - React, Tailwind, and code Playground
HTML
<span id="hours"></span>:<span id="minutes"></span>:<span id="seconds"></span>
JavaScript
var sec = -1;
function pad(val) { return val > 9 ? val : "0" + val; }
setInterval(function () {
$("#seconds").html(pad(++sec % 60));
$("#minutes").html(pad(parseInt(sec / 60, 10) % 60));
$("#hours").html(pad(parseInt(sec / 3600, 10)));
}, 1000);
if ($("#seconds") > 3) {
clearInterval();
}