commit | be025bf066fd720e53fed43ad7906e4b278e85ef | [log] [tgz] |
---|---|---|
author | Olivier ROBIN <olivierrobin@google.com> | Fri Aug 02 13:18:02 2024 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Aug 02 13:21:22 2024 |
tree | 658e324231779db03fa76f49723802894ed0d379 | |
parent | 813f717135e29158905bff102e6261499bb93106 [diff] |
Mark TimeTicks::UnixEpoch deprecated Internal MacOS TimeTicks function is using mach_absolute_time[1] which is suspended while system is asleep[3]. TimeTicks::UnixEpoch is returning a static value that is computed on the first call. This means that TimeTicks::UnixEpoch will not take into account system suspension and any TimeTicks comparison after such suspension will be offset by that amount (often hours or days). IMHO, this function should be removed as the TimeTicks documentation clearly states[2] that TimeTicks is for process duration and not to track absolute time (base::Time instead). [1]: https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time [2]: https://source.chromium.org/chromium/chromium/src/+/main:base/time/time.h;l=40 [3]: https://source.chromium.org/chromium/chromium/src/+/main:base/time/time.h;l=16 Bug: 349542284 Change-Id: Icc96a90612d9a50cf5f67e5c6c1610c87d3cfd07 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5731604 Reviewed-by: Peter Kasting <pkasting@chromium.org> Commit-Queue: Olivier Robin <olivierrobin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1336580} NOKEYCHECK=True GitOrigin-RevId: 1a6106ec2fc932237359fe1f54334a66bc4886f1