Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use monotonic clock for performance.now() (#33983)
Summary: In #32695, the `Performance.now()` implementation changed to use unix epoch timestamps instead of a monotonic clock. This is problematic, because it means that performance measurements get skewed if the device clock changes between two measurements. With this change, the clock is now monotonic (and the implementation stays consistent between platforms). More details and repro steps can be found in [this issue](#33977) Closes #33977 ## Changelog [General] [Fixed] - Use monotonic clock for performance.now() Pull Request resolved: #33983 Test Plan: Run on iOS and Android: ``` const now = global.performance.now() console.log(`${Platform.OS}: ${now}`) ``` Reviewed By: JoshuaGross, cipolleschi Differential Revision: D37066999 Pulled By: dmitryrykun fbshipit-source-id: 298547bf39faea1b025c17ff2d2e1a03f929865b
- Loading branch information