From: Guillaume Chau Date: Wed, 9 Mar 2022 13:30:24 +0000 (+0100) Subject: fix(devtools): perf: use high-resolution time X-Git-Tag: v3.2.32~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1070f127a78bfe7da6fe550cc272ef11a1f434a0;p=thirdparty%2Fvuejs%2Fcore.git fix(devtools): perf: use high-resolution time --- diff --git a/packages/runtime-core/src/profiling.ts b/packages/runtime-core/src/profiling.ts index b261694782..9b0f985262 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()) } }