summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyosuke Niwa <rniwa@webkit.org>2018-01-08 01:22:20 +0000
committerKonstantin Tokarev <annulen@yandex.ru>2018-01-15 09:38:10 +0000
commitbd0657f98aff85b9f06d85a8cf4da6a27f61a56e (patch)
tree202b8878780f877f9b33dc58258ff923e4f9a54b
parent8aed7c65423e2303432e355fa485ef91e830c9d2 (diff)
downloadqtwebkit-bd0657f98aff85b9f06d85a8cf4da6a27f61a56e.tar.gz
Reduce the precision of "high" resolution time to 1ms
Reduced the high prevision time's resolution to 1ms, the same precision as Date.now(). Based on upstream commit http://trac.webkit.org/changeset/226495 by Ryosuke Niwa <rniwa@webkit.org>. Change-Id: I0311c49774b55c40a6ee5c1de97aee022e3b9142 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--Source/WebCore/page/Performance.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebCore/page/Performance.cpp b/Source/WebCore/page/Performance.cpp
index 72b73b16d..254bf0d3e 100644
--- a/Source/WebCore/page/Performance.cpp
+++ b/Source/WebCore/page/Performance.cpp
@@ -245,8 +245,8 @@ void Performance::webkitClearMeasures(const String& measureName)
double Performance::now() const
{
- double nowSeconds = WTF::monotonicallyIncreasingTime() - m_referenceTime;
- const double resolutionSeconds = 0.000005;
+ double nowSeconds = monotonicallyIncreasingTime() - m_referenceTime;
+ const double resolutionSeconds = 0.001;
return 1000.0 * floor(nowSeconds / resolutionSeconds) * resolutionSeconds;
}