The problem with using setInterval is that I don't think there is a way to specify an arbitrary delay before the first function invokation, the first invokation will always happen after a delay that is equal to the period, so we would still have to use setTimeout for the first event and so we would still have to handle the issue of when to schedule the next event given that there is a delay on the first event.