MCPcopy
hub / github.com/facebook/react / startEffectTimer

Function startEffectTimer

packages/react-reconciler/src/ReactProfilerTimer.js:674–683  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

672}
673
674export function startEffectTimer(): void {
675 if (!enableProfilerTimer || !enableProfilerCommitHooks) {
676 return;
677 }
678 profilerStartTime = now();
679 if (componentEffectStartTime < 0) {
680 // Keep track of the first time we start an effect as the component's effect start time.
681 componentEffectStartTime = profilerStartTime;
682 }
683}
684
685export function transferActualDuration(fiber: Fiber): void {
686 // Transfer time spent rendering these children so we don't lose it

Callers 8

commitHookLayoutEffectsFunction · 0.90
commitAttachRefFunction · 0.90
safelyDetachRefFunction · 0.90

Calls 1

nowFunction · 0.50

Tested by

no test coverage detected