Explorar el Código

check for Performance object capabilities

Alexander Rose hace 5 años
padre
commit
29b6a88343
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {