W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2012

[HighResolutionTime] Spec consistently uses "monotonically increasing" when it means "monotonically nondecreasing"

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 May 2012 14:13:38 -0400
Message-ID: <4FB14B52.6070407@mit.edu>
To: public-web-perf@w3.org
An example, from section 4.4:

   The time values returned when calling the now method MUST be
   monotonically increasing

if actually implemented as written, that would mean that this test:

   if (window.performance.now() <= window.performance.now())

would have to always test false.  But there is no way to reconcile that 
with the allowed limits on the accuracy of the returned value.  In 
particular, if an implementation runs the code above in less than a 
microsecond or so, I would expect the two now() calls to return the same 
value and the condition to test true.

The spec should use "nondecreasing" if that's what it means.  If it 
really means "increasing", then I'd like to understand how this can 
possibly be implemented.

-Boris

P.S.  Gecko implements nondecreasing in practice.
Received on Monday, 14 May 2012 18:14:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:32 UTC