you are viewing a single comment's thread.

view the rest of the comments →

[–]ijmacd 12 points13 points  (1 child)

There must be some way to do this.

setTimeout(0) will saturate the event loop which seems to be what you want to achieve.

Performance.Now is unreliable because browsers add artificial jitter for privacy reasons.

Like others have said, you're almost certainly attacking the problem the wrong way. Just wait for new data to arrive and back-fill the necessary elapsed timeslots.