From 9b2a21d6731a2c09f134f7ac0b053af85807fb2f Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Tue, 10 Sep 2024 14:36:51 -0400 Subject: [PATCH] Don't call performance.now() twice in a row --- packages/react-reconciler/src/ReactProfilerTimer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js index 283b0e1f6a920..eaa24dc9fdc3b 100644 --- a/packages/react-reconciler/src/ReactProfilerTimer.js +++ b/packages/react-reconciler/src/ReactProfilerTimer.js @@ -101,7 +101,7 @@ function startProfilerTimer(fiber: Fiber): void { profilerStartTime = now(); if (((fiber.actualStartTime: any): number) < 0) { - fiber.actualStartTime = now(); + fiber.actualStartTime = profilerStartTime; } }