JSFiddle - React, Tailwind, and code Playground
by QMaster
HTML
<div id="clk">
</div>
JavaScript
rate = 1;
clockstart = 0;
function padzero (n) {
if (n < 10 ) { return "0" + n }
else { return "" + n }
clocktime = Math.max (clockstart + rate*
( time - inPoint ), 0 );
t = Math.floor( clocktime );
min = Math.floor( ( t%3600 ) / 60 );
sec = Math.floor( t%60 );
min = ":" + padzero ( sec );
document.getElementById("clk").html(clocktime);
}