Skip to content
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

Performance.now() should use an underlying primitive #44

Closed
plehegar opened this issue Apr 18, 2017 · 4 comments
Closed

Performance.now() should use an underlying primitive #44

plehegar opened this issue Apr 18, 2017 · 4 comments
Assignees
Milestone

Comments

@plehegar
Copy link
Member

This would help solve w3c/requestidlecallback#54 ( and probably others in the same situation)

@igrigorik
Copy link
Member

igrigorik commented Apr 18, 2017

What does 'underlying primitive' mean here? Our current definition...

https://w3c.github.io/hr-time/#the-performance-interface

The now() method must return a DOMHighResTimeStamp representing the high resolution time from the time origin to the occurrence of the call to the Performance.now method.

/cc @annevk

@plehegar
Copy link
Member Author

I believe we need to do as follows:

  1. In hr-time, abstract the concept behind Performance.now() and have Performance.now() use that concept
  2. whenever we refer to "Let now be the value returned by performance.now()." or "Let now be the current time.", we should use the concept defined in hr-time instead of referring to Performance.now() or "the current time".

@plehegar
Copy link
Member Author

This would probably be something like adding the following definition:
[[
The "current high resolution time" is the high resolution time from the time origin to the present (typically called "now").
]]
Then, you would update the definition of Performance.now() as follows:
[[
The now() method MUST return the current high resolution time.
]]

@igrigorik
Copy link
Member

I see, ok. Sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants