JSFiddle - React, Tailwind, and code Playground

HTML

<div id="time"></div>

JavaScript

var currentTime = 0;

window.setInterval(timer, 100)

function timer() {
    currentTime = currentTime + 0.1;    
    $('#time').text(currentTime);
}