Re: More on workerStart

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