Re: [HighResolutionTime] comments on performance.now

On Wed, 11 Apr 2012 18:17:47 +0200, Jatinder Mann <jmann@microsoft.com>
wrote:

>> This might not be a problem in the majority of cases, but I've been  
>> told that at least a few years ago some
>> cases was no better than 10ms resolution (maybe it wasn't a hardware  
>> limitation but a limitation somewhere
>> else). This is apparently mostly changed today, but I still think the  
>> spec shouldn't say to do something impossible
>> when facing underlying limitations. (For instance, timer resolution  
>> might be reduced intentionally to not drain the battery.)
>
> I have updated the definition to include a SHOULD clause in returning  
> microsecond resolution on millisecond units. I have also added a note  
> that suggests UA should fallback to millisecond resolution on  
> millisecond units when they have hardware or software constraints on  
> providing a sub-millisecond resolution.

Thanks, but please don't use RFC2119 keywords ("should") in notes.


>>> I don't understand why we wouldn't want to include the time of
>>> suspension - performance.now() defines the current time since the
>>> start of navigation. Let me know if I misunderstood your intention  
>>> here.
>>
>> Right, I'd just like it to be called out explicitly.
>
> I have added a note that clarifies this behavior.

"As the now() method returns the current time, time spent when the User  
Agent is not fully active after the start of the navigation will not be  
excluded from the time value returned."

s/User Agent/Document/

HTML's concept of "fully active" is about Documents. A document is not  
fully active when it has been navigated away and sits in history, for  
instance.

Maybe something like:

"Note: The time spent while a Document is not _fully active_ is included  
for the purpose of the now method."

with _fully active_ being a reference to  
http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#fully-active

-- 
Simon Pieters
Opera Software

Received on Thursday, 12 April 2012 13:17:31 UTC