From 1070f127a78bfe7da6fe550cc272ef11a1f434a0 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Wed, 9 Mar 2022 14:30:24 +0100 Subject: [PATCH] fix(devtools): perf: use high-resolution time --- packages/runtime-core/src/profiling.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/profiling.ts b/packages/runtime-core/src/profiling.ts index b2616947..9b0f9852 100644 --- a/packages/runtime-core/src/profiling.ts +++ b/packages/runtime-core/src/profiling.ts @@ -14,7 +14,7 @@ export function startMeasure( } if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { - devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now()) + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()) } } @@ -33,7 +33,7 @@ export function endMeasure(instance: ComponentInternalInstance, type: string) { } if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { - devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now()) + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()) } }