Html5's audio time update event ontimeupdate how to update more smoothly

I want to make a music playback progress bar according to the music playback time, but ontimeupdate will get one card each time it updates the time. How can it increase the time smoothly? The following is an example from the rookie tutorial. The value of currentTime is shown in the irregular increasing order of 4.7, 5.0and 5.5, so how to make it increase regularly, 4.8, 4.8and 4.9?

http://www.runoob.com/try/try.

Mar.15,2021

//  id="myVideo"  video 
var vid = document.getElementById("myVideo");

//  video  ontimeupdate   
//vid.ontimeupdate = function() {myFunction()};
setInterval( myFunction,100)
function myFunction() 
{
    //  id="demo"  p  
    document.getElementById("demo").innerHTML = (vid.currentTime).toFixed(1);
}
Menu