(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #8)
I'll be interested to hear mconley's thoughts here...
Hey, thanks for tagging me in. :)
Having just read bug 1321878 comment 10, I've come to the conclusion that I don't know enough about the OS-level implementations of TimeStamps to speak with tooooooo much authority, however, here are some random thoughts:
As we continue to work on performance, and as we continue to create new process types, I think we all agree that it's necessary to have the ability to measure a delta between timestamps captured in different processes, and be able to trust that delta.
If it's not physically possible to get an accurate delta between the timestamps of two processes on certain types of hardware, we need to poison our measurements to make that inability clear. I guess that's what bug 1336238 kinda resembles.
Reading the rest of bug 1321878, it sounds like it's unclear whether or not the "low resolution" mode for timestamps on low-end hardware are consistent. That sounds like a blank spot in our understanding that we need to clear up. Maybe we can get Honza's help here.
If it turns out via (3) that the low-resolution timestamps are in fact consistent, then (2) can maybe be modified so that instead of saying that the delta is unreliable, we say that the delta has wider error bars.
- Ideally, we need to be able to get these timestamps in a way that's easy for privileged JS to get at in all processes, with or without a DOM window.
It seems like we already get some of (4) via Cu.now(), which uses mozilla::TimeStamp, and returns a delta between that process creation and the current time.
If it turns out from (3) that we can trust mozilla::TimeStamp to be consistent, then perhaps what we need is to have Cu.now() return mozilla::TimeStamp::Now(), and have something like Cu.processCreation() return the process creation time. If mozilla::TimeStamp is consistent in the low-res case, then mozilla::TimeStamp::Now() from one process delta'd with a mozilla::TimeStamp::Now() from another would give us what we need... no?