JSFiddle - React, Tailwind, and code Playground

HTML

<button id="lap">Lap</button>
<div id="screen"></div>

JavaScript

$(document).ready(function(){
    var time = 0;
    var timer;
  
    $('#lap').click(function(){
        if (!timer){
            timer = setInterval(function(){
                time+=0.010;
                $("#screen p:last").text(time.toFixed(2));
            },10);
        }
        $("#screen").append('<p>'+time+'</p>');
        
    });
});