主题
now
js
_.now()
获取自 Unix 纪元(1 月 1 日 1970 00
:00:00 UTC)以来经过的毫秒数的时间戳。
¥Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00
:00:00 UTC).
新增于
¥Since
2.4.0
返回
¥Returns
(数值):返回时间戳。
¥(number): Returns the timestamp.
示例
¥Example
js
_.defer(function(stamp) {
console.log(_.now() - stamp);
}, _.now());
// => Logs the number of milliseconds it took for the deferred invocation.