@@ -225,7 +225,8 @@ import {
225225 recordCommitTime ,
226226 resetNestedUpdateFlag ,
227227 startProfilerTimer ,
228- stopProfilerTimerIfRunningAndRecordDelta ,
228+ stopProfilerTimerIfRunningAndRecordDuration ,
229+ stopProfilerTimerIfRunningAndRecordIncompleteDuration ,
229230 syncNestedUpdateFlag ,
230231} from './ReactProfilerTimer' ;
231232
@@ -1844,7 +1845,7 @@ function handleThrow(root: FiberRoot, thrownValue: any): void {
18441845 // Record the time spent rendering before an error was thrown. This
18451846 // avoids inaccurate Profiler durations in the case of a
18461847 // suspended render.
1847- stopProfilerTimerIfRunningAndRecordDelta ( erroredWork , true ) ;
1848+ stopProfilerTimerIfRunningAndRecordDuration ( erroredWork ) ;
18481849 }
18491850
18501851 if ( enableSchedulingProfiler ) {
@@ -2516,7 +2517,7 @@ function performUnitOfWork(unitOfWork: Fiber): void {
25162517 } else {
25172518 next = beginWork ( current , unitOfWork , entangledRenderLanes ) ;
25182519 }
2519- stopProfilerTimerIfRunningAndRecordDelta ( unitOfWork , true ) ;
2520+ stopProfilerTimerIfRunningAndRecordDuration ( unitOfWork ) ;
25202521 } else {
25212522 if ( __DEV__ ) {
25222523 next = runWithFiberInDEV (
@@ -2660,7 +2661,7 @@ function replayBeginWork(unitOfWork: Fiber): null | Fiber {
26602661 }
26612662 }
26622663 if ( isProfilingMode ) {
2663- stopProfilerTimerIfRunningAndRecordDelta ( unitOfWork , true ) ;
2664+ stopProfilerTimerIfRunningAndRecordDuration ( unitOfWork ) ;
26642665 }
26652666
26662667 return next ;
@@ -2851,7 +2852,7 @@ function completeUnitOfWork(unitOfWork: Fiber): void {
28512852 next = completeWork ( current , completedWork , entangledRenderLanes ) ;
28522853 }
28532854 // Update render duration assuming we didn't error.
2854- stopProfilerTimerIfRunningAndRecordDelta ( completedWork , false ) ;
2855+ stopProfilerTimerIfRunningAndRecordIncompleteDuration ( completedWork ) ;
28552856 }
28562857
28572858 if ( next !== null ) {
@@ -2909,7 +2910,7 @@ function unwindUnitOfWork(unitOfWork: Fiber, skipSiblings: boolean): void {
29092910
29102911 if ( enableProfilerTimer && ( incompleteWork . mode & ProfileMode ) !== NoMode ) {
29112912 // Record the render duration for the fiber that errored.
2912- stopProfilerTimerIfRunningAndRecordDelta ( incompleteWork , false ) ;
2913+ stopProfilerTimerIfRunningAndRecordIncompleteDuration ( incompleteWork ) ;
29132914
29142915 // Include the time spent working on failed children before continuing.
29152916 let actualDuration = incompleteWork . actualDuration ;
0 commit comments