Skip to content

add a kagura.Timer

Latest
Compare
Choose a tag to compare
@nakasyou nakasyou released this 29 Dec 05:27
· 2 commits to main since this release

add a kagura.Timer

const timer=new kagura.Timer()
setTimeout(()=>{
  console.log(timer.time+"ms") //1000ms
},1000)

set unit:

const timer=new kagura.Timer(1/1000)
setTimeout(()=>{
  console.log(timer.time+"s") //1s
},1000)