1var getNative = require('../internal/getNative'); 2 3/* Native method references for those with the same name as other `lodash` methods. */ 4var nativeNow = getNative(Date, 'now'); 5 6/** 7 * Gets the number of milliseconds that have elapsed since the Unix epoch 8 * (1 January 1970 00:00:00 UTC). 9 * 10 * @static 11 * @memberOf _ 12 * @category Date 13 * @example 14 * 15 * _.defer(function(stamp) { 16 * console.log(_.now() - stamp); 17 * }, _.now()); 18 * // => logs the number of milliseconds it took for the deferred function to be invoked 19 */ 20var now = nativeNow || function() { 21 return new Date().getTime(); 22}; 23 24module.exports = now; 25 26