Re: Intent to implement and ship: Performance.translateTime

2015-11-20 Thread Anne van Kesteren
On Fri, Nov 20, 2015 at 9:49 AM, Jonas Sicking wrote: > I'd be quite happy if someone else would :) Filed https://github.com/w3c/hr-time/issues/22 on the general nested worker problem. Filed https://github.com/w3c/hr-time/issues/23 on the Client object thing. -- https://annevankesteren.nl/ ___

Re: Intent to implement and ship: Performance.translateTime

2015-11-20 Thread Jonas Sicking
On Thu, Nov 19, 2015 at 5:38 PM, Boris Zbarsky wrote: >> Though Service Workers do actually have a 'client' object which >> represent window objects. So we could enable passing those as global >> to the translate function. > > That's a good idea. Want to raise it with the webperf WG? Seems like

Re: Intent to implement and ship: Performance.translateTime

2015-11-19 Thread Boris Zbarsky
On 11/19/15 6:57 PM, Jonas Sicking wrote: You can actually create a MessageChannel and then send one of the ports to a sub-sub-worker. Ah, good point. Unfortunately the other port can't be used as something that represents the sub-sub-worker since even after a port has started getting used, i

Re: Intent to implement and ship: Performance.translateTime

2015-11-19 Thread Jonas Sicking
On Thu, Nov 19, 2015 at 2:48 PM, Boris Zbarsky wrote: > On 11/19/15 5:39 PM, Jonas Sicking wrote: >> >> This API doesn't seem to work for nested workers (which Blink doesn't >> implement), does it? Since there's no way in the window to get hold of >> a reference of a sub-sub-worker. > > While true

Re: Intent to implement and ship: Performance.translateTime

2015-11-19 Thread Boris Zbarsky
On 11/19/15 5:39 PM, Jonas Sicking wrote: This API doesn't seem to work for nested workers (which Blink doesn't implement), does it? Since there's no way in the window to get hold of a reference of a sub-sub-worker. While true, there is also no way to directly get a message from a sub-sub-work

Re: Intent to implement and ship: Performance.translateTime

2015-11-19 Thread Jonas Sicking
This API doesn't seem to work for nested workers (which Blink doesn't implement), does it? Since there's no way in the window to get hold of a reference of a sub-sub-worker. It also doesn't seem possible for a worker to convert to the timeline of a parent window, since there's no object representi

Intent to implement and ship: Performance.translateTime

2015-11-19 Thread Boris Zbarsky
Summary: A new method on Performance that allows translating a timestamp from one timeline to another. The idea is that you can take a performance.now() value or performance mark from some other global and convert them to the timeline of your global. It works like this: var myTime = Perfor