dateGetTime.js 289 B

1234567891011121314151617181920
  1. "use strict";
  2. // benchmark ways to get current time
  3. // tests
  4. exports.dateGetTime = {
  5. "#getTime()": function() {
  6. new Date().getTime();
  7. },
  8. ".now()": function() {
  9. Date.now();
  10. },
  11. };
  12. // if run directly run benchmarks
  13. if (!module.parent) require("benchmarksman").runner(exports);