pumpTimers method
Advances this context's JavaScript event loop once.
Runs due timers and Promise jobs, then returns the delay until the next timer. A null result means that no timer is currently scheduled.
Normal run and call requests do not need this. It is intended for long-lived hosts that must keep timers moving while no JavaScript request is active.
Implementation
Future<Duration?> pumpTimers() async {
_ensureOpen();
final milliseconds = await _adapter.pumpTimers();
return milliseconds == null ? null : Duration(milliseconds: milliseconds);
}