- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Mon, 15 Jun 2015 23:58:54 -0400
- To: Ilya Grigorik <igrigorik@google.com>, Todd Reifsteck <toddreif@microsoft.com>
- CC: Justin Rogers <justrog@microsoft.com>, Jonas Sicking <jonas@sicking.cc>, "public-web-perf@w3.org" <public-web-perf@w3.org>, Przemysław Pietrzkiewicz <ppi@google.com>, Travis Leithead <travis.leithead@microsoft.com>
On 6/15/15 2:34 PM, Ilya Grigorik wrote:
> DOMHighResTimeStamp now(optional (Window or WorkerGlobalScope)
> timeOriginBasis);
(Window or Worker), I assume?
> - same behavior as previously when called without arguments - i.e. time
> in ms from time origin of current context.
More precisely, from the time origin of the global of the Performance
object that is the "this" value for the function call, right?
> As a result, if I get a timestamp from a worker or a different window I
> can: receivedTimestamp - performance.now(sourceOfTimestamp) to translate
> into current timeline?
No, it would have to be:
receivedTimestamp +
(performance.now() - performance.now(sourceOfTimestamp))
and it took me a bit of thinking through the time origins to come up
with that. :( Also, it will obviously be off by however long it takes
to make one (or two, depending) performance.now() calls.
-Boris
Received on Tuesday, 16 June 2015 03:59:26 UTC