javascript - performance.now() 是否从 navigationStart 开始?
问题描述
performance.now() 的起始时间是什么时候?是navigationStart、requestStart 还是别的什么?
解决方案
performance.timing.navigationStart + performance.now() 将大约等于 Date.now()
performance.now() = Date.now() - performance.timing.navigationStart
1970 年 1 月 1 日以后的performance.now()
开始导航开始毫秒!
推荐阅读
- javascript - 如何使用循环检测数组是否为空间?
- reactjs - React 自定义钩子不会更新状态
- javascript - 将数组中的所有元素加入单个字符串后无法更新 React.useState("")
- html - 使用 jQuery 提取 XML 中的 CDATA 以用作 HTML
- nopcommerce - Nopcommerce 导出用户角色
- react-native - 如何使用 React Native 在应用程序图标上显示消息数量?(适用于安卓和IOS)
- latex - 我无法打开样式文件 IEEEbib.bst
- javascript - 如何使用reduce计算数组中的项目?
- python - SWIG 将 Python 列表转换为 char ** 示例失败
- email - 当我的网站出现错误时,我想发送一封电子邮件,但我有一些错误