You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
520 B

пре 4 година
  1. var root = require('./_root');
  2. /**
  3. * Gets the timestamp of the number of milliseconds that have elapsed since
  4. * the Unix epoch (1 January 1970 00:00:00 UTC).
  5. *
  6. * @static
  7. * @memberOf _
  8. * @since 2.4.0
  9. * @category Date
  10. * @returns {number} Returns the timestamp.
  11. * @example
  12. *
  13. * _.defer(function(stamp) {
  14. * console.log(_.now() - stamp);
  15. * }, _.now());
  16. * // => Logs the number of milliseconds it took for the deferred invocation.
  17. */
  18. var now = function() {
  19. return root.Date.now();
  20. };
  21. module.exports = now;