-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Each on event gets triggered exactly 6 times for one timer.
import Timer from 'tiny-timer'
const timer = new Timer({ interval: 1000, stopwatch: false })
timer.on('statusChanged', (status) => { console.log(status, Math.random()) })
timer.start(12000)
result:
running 0.2440708450748057
running 0.34142709021610296
running 0.6499113810642303
running 0.8082136213201725
running 0.43492532140397766
running 0.6325079204326065
stopped 0.10928056634093375
stopped 0.8905471982134121
stopped 0.37517316268358103
stopped 0.2731666295435524
stopped 0.9399286310551669
stopped 0.830340903702175
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels