-
Notifications
You must be signed in to change notification settings - Fork 30
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
Time Origin in Workers - official moment of creation or not? #41
Comments
It may make sense for a DedicatedWebWorker's time origin to match the Document that spawned it. That would make it so developers can more easily reason about timestamps gathered in both the document and its workers. This convenience breaks down for SharedWorkers, so I would say it is not worth making different behavior for different types of Workers. I suggest keeping the spec as is, filing bugs on browsers, and adding a web platform test to cover this. But I want to make sure my interpretation of the spec and test case is correct. |
It is. You can scrub through the past conversations on translateTime to see us covering the same points.. Also why we introduced https://w3c.github.io/hr-time/#dom-performance-timeorigin in L3. WPT tests + bugs is the right path forward. |
This tests: https://w3c.github.io/hr-time/#time-origin-1 This addresses: w3c/hr-time#41
The spec specifically mentions that the time origin for Workers:
This doesn't appear to match implementations. For example:
Based on the spec, I would expect very low numbers for both logs. The one on the page because it is very close to the page's load. The one in the worker because it is very close to the worker's load.
Implementations are consistent but differ from the spec:
Chrome (v55)
page: 13.495
worker: 1047.71
Firefox (v51)
page: 17.135
worker: 1032.125
I am unable to test on Edge. If someone could include their numbers that would be fantastic!
The text was updated successfully, but these errors were encountered: