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

negative duration values #2

Closed
plehegar opened this issue Feb 3, 2015 · 3 comments
Closed

negative duration values #2

plehegar opened this issue Feb 3, 2015 · 3 comments

Comments

@plehegar
Copy link
Member

plehegar commented Feb 3, 2015

From https://lists.w3.org/Archives/Public/public-web-perf/2015Jan/0049.html
[[
In working on the implementation of the User Timing spec in Gecko, it was
brought up about the potential of durations to return negative values.
Specifically it was unclear from the spec whether things like this should
be allowed:

performance.mark('A');
performance.mark('B');

performance.measure('delta', 'B', 'A');

assert( performance.getEntriesByName('delta')[0].duration < 0 ); // true

Chrome allows this interaction, enabling negative duration values for
measures. Is this intended, and if so, should we clarify the spec that
negative durations are allowed for performance measurements specifically?
]]

@igrigorik
Copy link
Member

I think negative values are reasonable, and AFAIK, IE allows negative values as well.

@toddreifsteck
Copy link
Member

Ilya is correct. A quick test during the call when we discussed this issue demonstrated that many browsers allow negatives. I believe we should update the spec with this language.

@toddreifsteck
Copy link
Member

@phlegar Please let us know if you have feedback on the merged update. Thanks!

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

No branches or pull requests

3 participants