https://github.com/facebook/react/blob/30b47103d4354d9187dc0f1fb804855a5208ca9f/packages/scheduler/src/Scheduler.js#L180-L185
let timer = peek(timerQueue);
  while (timer !== null) {
    if (timer.callback === null) {
      
      pop(timerQueue);
    } else if (timer.startTime <= currentTime) {
      
      pop(timerQueue);
      timer.sortIndex = timer.expirationTime;
      push(taskQueue, timer);
      if (enableProfiling) {
        markTaskStart(timer, currentTime);
        timer.isQueued = true;
      }
    } else {
      
      return;
    }
    timer = peek(timerQueue);
  }
}
function handleTimeout(currentTime) {