{"size": 711, "ext": "js", "max_stars_repo_path": "src/now.js", "max_stars_repo_name": "nuintun/tween", "max_stars_repo_stars_event_min_datetime": "2020-07-28T13:47:57.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-28T13:47:57.000Z", "max_issues_repo_path": "src/now.js", "max_issues_repo_name": "nuintun/tween", "max_issues_repo_issues_event_min_datetime": "2017-07-28T07:45:02.000Z", "max_issues_repo_issues_event_max_datetime": "2019-05-16T03:22:47.000Z", "max_forks_repo_path": "src/now.js", "max_forks_repo_name": "nuintun/tween", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 25.3928571429, "max_line_length": 81, "alphanum_fraction": 0.6596343179}
/**
 * @module now
 * @license MIT
 * @author nuintun
 */

// Include a performance.now polyfill
import * as Utils from './utils';

export var now;

if (self && self.performance && Utils.typeIs(self.performance.now, 'Function')) {
  // In a browser, use self.performance.now if it is available.
  // This must be bound, because directly assigning this function
  // leads to an invocation exception in Chrome.
  now = function() {
    return self.performance.now.call(self.performance);
  };
} else if (Utils.typeIs(Date.now, 'Function')) {
  // Use Date.now if it is available.
  now = Date.now;
} else {
  // Otherwise, use 'new Date().getTime()'.
  now = function() {
    return new Date().getTime();
  };
}
