Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1894242 [wpt PR 45989] - compute pressure: Fix timestamp to be re…
…lative to the time origin, a=testonly Automatic update from web-platform-tests compute pressure: Fix timestamp to be relative to the time origin The Compute Pressure API specification stipulates that the timestamp must be relative to time origin of the global associated object with the PressureObserver instance that generates the notification.[1] The implementation was reporting the current time, relative to epoch in Unix-like system. This patch fixes the issue, by using base::TimeTicks instead of base::Time, which is always incrementing, and also by subtracting the time origin from the current time to provide a timespace relative to the time origin of the associated object. [1]: https://w3c.github.io/compute-pressure/#the-pressurerecord-interface Bug: 336140984 Change-Id: I5e3cfb5ad966f62ce13ade3d81e55b5b4273025a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5472087 Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costaintel.com> Reviewed-by: Michael Cui <mlcuigoogle.com> Reviewed-by: Daniel Cheng <dchengchromium.org> Commit-Queue: Arnaud Mandy <arnaud.mandyintel.com> Cr-Commit-Position: refs/heads/main{#1296013} -- wpt-commits: c5ced76d2189c00405d2c153f406fdcd8f91781d wpt-pr: 45989 UltraBlame original commit: 900af819e11a361a5fd3f1b1c6f51db6a318538d
- Loading branch information