Skip to content

Commit

Permalink
fix(devtools): perf: use high-resolution time
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Mar 9, 2022
1 parent 5898629 commit 1070f12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/profiling.ts
Expand Up @@ -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())
}
}

Expand All @@ -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())
}
}

Expand Down

0 comments on commit 1070f12

Please sign in to comment.