mike-north/ember-perf

View on GitHub
addon/utils/performance-now.js

Summary

Maintainability
A
0 mins
Test Coverage
export default function performanceNow() {
  if ('performance' in window && typeof window.performance.now === 'function' && typeof fastboot === 'undefined') {
    return window.performance.now();
  } else {
    return new Date().valueOf();
  }
}