Add built-in Date.now fork back.

This commit is contained in:
jdalton
2015-05-31 13:27:35 -07:00
parent 29e0d37009
commit 88270a7b66
3 changed files with 25 additions and 4 deletions

View File

@@ -751,6 +751,7 @@
nativeKeys = getNative(Object, 'keys'),
nativeMax = Math.max,
nativeMin = Math.min,
nativeNow = getNative(Date, 'now'),
nativeParseInt = context.parseInt,
nativeRandom = Math.random;
@@ -7280,9 +7281,9 @@
* }, _.now());
* // => logs the number of milliseconds it took for the deferred function to be invoked
*/
function now() {
var now = nativeNow || function() {
return new Date().getTime();
}
};
/*------------------------------------------------------------------------*/