Re: More on workerStart

On 6/17/15 7:47 PM, Ilya Grigorik wrote:
> Ok. Not 100% on the language, but an attempt...
>
> partial interface Performance {
>    DOMHighResTimeStamp translateTime(DOMHighResTimeStamp time, (Window
> or Worker) timeSource);
> };
>
> The `translateTime` method MUST return a DOMHighResTimeStamp that is the
> result of adding the provided `time`, and the difference of `now` method
> called in the global of the performance object that is the `this` value
> for the function call and the `now` method called in the provided
> `timeSource`.
>
> (Something tells me this can be simplified.. :))

The last part should probably be "the difference between the time origin 
of the provided timeSource and the time origin of the global of the 
performance object that is the `this` value for the translateTime call".

This will, obviously, require defining what the time origin of a Worker 
is (in terms of the corresponding WorkerGlobalScope's time origin).

There's no shorter way to refer to the "this value" thing so far, sadly, 
though there have been some proposal for common terminology for that...

-Boris

Received on Thursday, 18 June 2015 03:02:33 UTC