Re: More on workerStart

On Tue, Jun 2, 2015 at 2:04 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 6/2/15 4:58 PM, Ilya Grigorik wrote:
>
>> Based on your earlier example: "to allow whoever has a reference to the
>> worker to convert its times into their own timebase".
>>
>
> OK.  To put that on a sound footing, you need to ensure that the timebase
> of either a global or an environment settings object is well-defined in all
> cases and then do what I suggested in my previous mail: take the difference
> between the timebase of the worker global (or corresponding settings
> object) and subtract the timebase of the incumbent settings object (or its
> global).  Depending on whether you put the timebase information on the
> global or on the settings object.


#time-origin
The time origin is the time value from which time is measured:
- If the global settings object specified by the incumbent settings object
is a Window object, the time origin must be equal to the time of the start
of navigation.
- Otherwise, if the global settings object specified by the incumbent
settings object is a WorkerGlobalScope object (dedicated worker), or
a SharedWorkerGlobalScope object (shared worker), the time origin must be
equal to the time [when the worker script settings object is set up](
http://dev.w3.org/html5/workers/#set-up-a-worker-script-settings-object).

#sec-worker-start
The workerStart attribute MUST return a DOMHighResTimeStamp representing
the difference between the worker's time origin and the time origin of the
incumbent settings object.

---

How does that look?

Received on Wednesday, 3 June 2015 17:50:21 UTC