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.
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}