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-16 10:05:02 +0000
commitd281c107389f43edb8ecdf47c4f49bd330837232 (patch)
tree51f4fd2d9b698fefe792bb865990773347692d21
parent81b9a8af071cc048a68c747cf73874340b3a4602 (diff)
downloadqtwebkit-5.6.tar.gz
Reduce the precision of "high" resolution time to 1ms5.6
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> (cherry picked from commit bd0657f98aff85b9f06d85a8cf4da6a27f61a56e)
-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;
}