]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(devtools): perf: use high-resolution time
authorGuillaume Chau <guillaume.b.chau@gmail.com>
Wed, 9 Mar 2022 13:30:24 +0000 (14:30 +0100)
committerGuillaume Chau <guillaume.b.chau@gmail.com>
Wed, 9 Mar 2022 13:30:24 +0000 (14:30 +0100)
packages/runtime-core/src/profiling.ts

index b2616947821221749e651990e4b87b473dc6b611..9b0f985262239d24e5ef5f0aef326fd45dfa7ef9 100644 (file)
@@ -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())
   }
 }