Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/IdleDeadline.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/IdleDeadline.cpp b/third_party/WebKit/Source/core/dom/IdleDeadline.cpp |
| index ed7f04eb2d6dec18533ce8cd777009394d5044a9..13f30bd33dd7d6f910b5b643fa401b0e4e996999 100644 |
| --- a/third_party/WebKit/Source/core/dom/IdleDeadline.cpp |
| +++ b/third_party/WebKit/Source/core/dom/IdleDeadline.cpp |
| @@ -21,7 +21,8 @@ double IdleDeadline::timeRemaining() const |
| if (timeRemaining < 0) |
| timeRemaining = 0; |
| - return timeRemaining * 1000; |
| + const double resolutionSeconds = 0.000005; |
|
esprehn
2015/09/24 21:33:06
This is just duplicating what performance.now does
rmcilroy
2015/09/24 22:53:18
Good idea, added PerformanceBase::clampTimeResolut
|
| + return 1000.0 * floor(timeRemaining / resolutionSeconds) * resolutionSeconds; |
| } |
| } // namespace blink |