Bug 84914

Summary: [Chromium] Need to expose TimeTicks::HighResNow()
Product: WebKit Reporter: James Simonsen <simonjam>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: jamesr, nduca, schenney, sullivan, tonyg
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

James Simonsen
Reported 2012-04-25 17:42:41 PDT
In order to properly implement window.performance.now(), we need a sub-millisecond timer. Currently, we return TimeTicks::Now(). On Windows, that only has (at best) a 1 ms resolution. We need to instead use TimeTicks::HighResNow() to get microsecond resolution. Note the warnings in time_win.cc that HighResNow() is slower and not always available. For some users, they'll never get better that tick resolution (1 - 15 ms). This should probably be plumbed through via monotonicallyIncreasingTime(). We should also be careful to ensure that TimeTicks::Now() and TimeTicks::HighResNow() use the same time base. The network times that are used for Navigation Timing are passed in by calling TimeTicks::Now() in the browser process.
Attachments
Note You need to log in before you can comment on or make changes to this bug.