A timer task is only allowed to run when the budget is non-negative. After a timer has executed, its run time is subtracted from the budget.
The budget regenerates with time (at rate of 0.01 seconds per second).
I think that would imply that if in any given second, your timer code runs for So for things like sending out heartbeat packets to keep connections alive, I'm assuming that doesn't count, because it happens asynchronously (waiting for the response, I mean)? If that's the case, and your 10 milliseconds only applies to running JavaScript on the CPU, then 10 milliseconds seems reasonable to me. It's a background tab, after all, it's disrespectful of your users to abuse their CPU more than that.