It never counts ticks. It stores startedAt and computes performance.now() - startedAt in render(), up to 60 times a second while it runs. Animation frames stop while a message is off screen and pick up again when it comes back, and the frame loop ends as soon as you press Stop.