-
Notifications
You must be signed in to change notification settings - Fork 24
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
Coarsen timeOrigin #106
Coarsen timeOrigin #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
index.html
Outdated
<div data-algorithm="relative high resolution time"> | ||
The <dfn data-export="">relative high resolution time</dfn> given a | ||
{{DOMHighResTimeStamp}} |time| and a [=Realm/global object=] |global|, | ||
runs the following steps: | ||
<ul> | ||
<li>Let |diff| be the difference between |time| and the |global|'s <a>time origin</a>.</li> | ||
<li>Let |diff| be the difference between |time| and caliing [=time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here, but also calling time origin timestamp
sounds pretty weird so I suggest either modifying the name above or leaving this as it was.
6bd48bf
to
ff6d2e6
Compare
ff6d2e6
to
2324ead
Compare
@npm1 - PTAL? |
index.html
Outdated
<div data-algorithm="relative high resolution time"> | ||
The <dfn data-export="">relative high resolution time</dfn> given a | ||
{{DOMHighResTimeStamp}} |time| and a [=Realm/global object=] |global|, | ||
runs the following steps: | ||
<ul> | ||
<li>Let |diff| be the difference between |time| and the |global|'s <a>time origin</a>.</li> | ||
<li>Let |diff| be the difference between |time| and calling [=get time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the result of calling? I'm not sure I see why adding 'get' makes this better, as the wording is now more awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified it, but open to change it to something else..
jitter |current time| such that its resolution will not exceed |time | ||
resolution|.</li> | ||
<li>Let |coarse time| be the result of calling [=coarsen time=] with | ||
|current global| and |current time|.</li> | ||
<li>Return the result of [=relative high resolution time=] given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to coarsen the time in the relative high resolution time method instead of here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, as it would make calling "relative HR time" safer.. Should we do that as a followup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No big rush as currently it wasn't doing this, although isn't this just moving the line above to be called at the beginning of relative high resolution time
or are there other changes I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easy, I just prefer not to mix it in this PR, as it's changing a different algorithm's semantics.
Co-authored-by: npm1 <npm@chromium.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for reviewing! :) |
This PR does multiple things:
performance.timeOrigin
/cc @annevk
Preview | Diff