MCPcopy
hub / github.com/microsoft/SandDance / getTimestamp

Function getTimestamp

docs/tests/v2/es6/js/sanddance.js:689–701  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

687var _globals = require("./globals");
688
689function getTimestamp() {
690 if (!_globals.isBrowser) {
691 var secondsAndNanoseconds = _globals.process.hrtime();
692
693 return secondsAndNanoseconds[0] + secondsAndNanoseconds[1] / 1e6;
694 }
695
696 if (_globals.window.performance) {
697 return _globals.window.performance.now();
698 }
699
700 return Date.now();
701}
702
703var startTimestamp = getTimestamp();
704exports.startTimestamp = startTimestamp;

Callers 1

sanddance.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected