Source/WebCore: Implement high-resolution time via window.performance.webkitNow()
authornduca@chromium.org <nduca@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 22:34:46 +0000 (22:34 +0000)
committernduca@chromium.org <nduca@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 22:34:46 +0000 (22:34 +0000)
commit996af5990785c3f37d406668d59db25ed10730ce
tree9148ac099fca390b48e606a1fcf61cfafaa57a1a
parent5a5e45a61cc3b2f1541295f417fcc9d9ff5673a1
Source/WebCore: Implement high-resolution time via window.performance.webkitNow()
https://bugs.webkit.org/show_bug.cgi?id=66684

This implements the high resolution time spec from
http://www.w3.org/TR/hr-time/, giving javascript access to
sub-millisecond timestamps that increase over time instead of being
subject to skewing, for example when the host machine's clock changes.

Reviewed by Tony Gentilcore.

Test: fast/performance/performance-now-timestamps.html

* page/Performance.cpp:
(WebCore::Performance::now):
(WebCore):
* page/Performance.h:
(Performance):
* page/Performance.idl:

LayoutTests: Implement high-resolution time via window.performance.now()
https://bugs.webkit.org/show_bug.cgi?id=66684

This implements the high resolution time spec from
http://www.w3.org/TR/hr-time/, giving javascript access to
sub-millisecond timestamps that increase over time instead of being
subject to skewing, for example when the host machine's clock changes.

Reviewed by Tony Gentilcore.

* fast/dom/Window/window-properties-performance-expected.txt:
* fast/performance/performance-now-timestamps-expected.txt: Added.
* fast/performance/performance-now-timestamps.html: Added.
* fast/performance/script-tests/TEMPLATE.html: Added.
* fast/performance/script-tests/performance-now-timestamps.js: Added.
(busyWait):
* platform/qt/fast/dom/Window/window-properties-performance-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-properties-performance-expected.txt
LayoutTests/fast/performance/performance-now-timestamps-expected.txt [new file with mode: 0644]
LayoutTests/fast/performance/performance-now-timestamps.html [new file with mode: 0644]
LayoutTests/fast/performance/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/fast/performance/script-tests/performance-now-timestamps.js [new file with mode: 0644]
LayoutTests/platform/qt/fast/dom/Window/window-properties-performance-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoadTiming.cpp
Source/WebCore/loader/DocumentLoadTiming.h
Source/WebCore/page/Performance.cpp
Source/WebCore/page/Performance.h
Source/WebCore/page/Performance.idl