-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <reillyg@chromium.org> Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Michael Cui <mlcui@google.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Cr-Commit-Position: refs/heads/main@{#1296013}
- Loading branch information
1 parent
10faea3
commit c5ced76
Showing
2 changed files
with
74 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters