File tree 1 file changed +5
-4
lines changed
packages/scheduler/src/forks 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ const isInputPending =
98
98
? navigator . scheduling . isInputPending . bind ( navigator . scheduling )
99
99
: null ;
100
100
101
+ const continuousOptions = { includeContinuous : true } ;
102
+
101
103
function advanceTimers ( currentTime ) {
102
104
// Check for tasks that are no longer delayed and add them to the queue.
103
105
let timer = peek ( timerQueue ) ;
@@ -464,7 +466,7 @@ function shouldYieldToHost() {
464
466
} else if ( timeElapsed < maxInterval ) {
465
467
// Yield if there's either a pending discrete or continuous input.
466
468
if ( isInputPending !== null ) {
467
- return isInputPending ( { includeContinuous : true } ) ;
469
+ return isInputPending ( continuousOptions ) ;
468
470
}
469
471
} else {
470
472
// We've blocked the thread for a long time. Even if there's no pending
@@ -511,9 +513,8 @@ function forceFrameRate(fps) {
511
513
const performWorkUntilDeadline = ( ) => {
512
514
if ( scheduledHostCallback !== null ) {
513
515
const currentTime = getCurrentTime ( ) ;
514
- // Yield after `yieldInterval` ms, regardless of where we are in the vsync
515
- // cycle. This means there's always time remaining at the beginning of
516
- // the message event.
516
+ // Keep track of the start time so we can measure how long the main thread
517
+ // has been blocked.
517
518
startTime = currentTime ;
518
519
const hasTimeRemaining = true ;
519
520
You can’t perform that action at this time.
0 commit comments