首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Date

_.now()

获取自 Unix 纪元(1970年1月1日00:00:00 UTC)以来经过的毫秒数的时间戳。

以来

2.4.0

返回

(数字):返回时间戳(timestamp)。

示例
代码语言:javascript
复制
_.defer(function(stamp) {
  console.log(_.now() - stamp);
}, _.now());
// => Logs the number of milliseconds it took for the deferred invocation.

扫码关注腾讯云开发者

领取腾讯云代金券