Skip to content

Add WPTs that RTCStats.timestamp is expressed in "Performance time". #48361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

For w3c/webrtc-pc#3005

Sadly Date.now() and performance.timeOrigin + performance.now() only
diverge in edge cases (e.g. laptop going to sleep or wall clock
changing while web page is still open?) so these WPTs may give false
positives to Wall Clock implementations, but they will at least
fail if clock is completely off and document correct behavior.

The current implementation is wrong, but we still pass the test because
of no divergence here. We need to exclude Windows at the moment though
because some of its clocks has precision limitations (example: [1]) and
there seems to be some mismatch between WebRTC's current clock impl and
Performance that becomes visible in this WPT (just a few ms delta).

[1] https://source.chromium.org/chromium/chromium/src/+/main:base/time/time.h;l=1180;drc=1a6106ec2fc932237359fe1f54334a66bc4886f1

Bug: chromium:369369568
Change-Id: Iad452519800aa4c41427317d29e4fb11235b2f37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5887191
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1361140}

For w3c/webrtc-pc#3005

Sadly Date.now() and performance.timeOrigin + performance.now() only
diverge in edge cases (e.g. laptop going to sleep or wall clock
changing while web page is still open?) so these WPTs may give false
positives to Wall Clock implementations, but they will at least
fail if clock is completely off and document correct behavior.

The current implementation is wrong, but we still pass the test because
of no divergence here. We need to exclude Windows at the moment though
because some of its clocks has precision limitations (example: [1]) and
there seems to be some mismatch between WebRTC's current clock impl and
Performance that becomes visible in this WPT (just a few ms delta).

[1] https://source.chromium.org/chromium/chromium/src/+/main:base/time/time.h;l=1180;drc=1a6106ec2fc932237359fe1f54334a66bc4886f1

Bug: chromium:369369568
Change-Id: Iad452519800aa4c41427317d29e4fb11235b2f37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5887191
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1361140}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit e093609 into master Sep 27, 2024
21 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-1ca5bbec08 branch September 27, 2024 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants