Преглед изворни кода

check for Performance object capabilities

Alexander Rose пре 5 година
родитељ
комит
29b6a88343
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/mol-task/util/user-timing.ts

+ 1 - 1
src/mol-task/util/user-timing.ts

@@ -7,7 +7,7 @@
 import { Task } from '../task'
 import { isProductionMode } from '../../mol-util/debug';
 
-const hasPerformance = typeof performance !== 'undefined'
+const hasPerformance = (typeof performance !== 'undefined') && performance.mark && performance.measure
 const timingEnabled = hasPerformance && !isProductionMode
 
 export namespace UserTiming {