Deadline is computed by the following:
- Is there rendering pending?
- How long until a timer is about to expire?
- How long has passed since the idle period started?
- Did a new task make it into the global queue?
I'm suggesting that instead of computing the deadline based on this, we expose the different values, not necessarily from within the idle callback.
- isFramePending, isInputPending etc.
- Expose something about "when is the next timer about to expire"
- Perhaps expose in the rIB when the idle period started
JS Libraries and websites can decide how they compute their "deadline".
The benefit is that this info is also valuable outside rIB.