Index: third_party/WebKit/Source/wtf/CurrentTime.h |
diff --git a/third_party/WebKit/Source/wtf/CurrentTime.h b/third_party/WebKit/Source/wtf/CurrentTime.h |
index e41ccad8755e3803efcb9a4f8cedc4c3e53cdd02..a7e9829c5c011e71f1ba4ad2aabde9687019c427 100644 |
--- a/third_party/WebKit/Source/wtf/CurrentTime.h |
+++ b/third_party/WebKit/Source/wtf/CurrentTime.h |
@@ -51,14 +51,19 @@ inline double currentTimeMS() |
// On unsupported platforms, this function only guarantees the result will be non-decreasing. |
WTF_EXPORT double monotonicallyIncreasingTime(); |
-typedef double(*TimeFunction)(void); |
-void setCurrentTimeFunction(TimeFunction); |
-WTF_EXPORT void setMonotonicallyIncreasingTimeFunction(TimeFunction); |
+using TimeFunction = double (*)(); |
+ |
+// Make all the time functions (currentTime(), monotonicallyIncreasingTime(), systemTraceTime()) return the result |
+// of the supplied function. Returns the pointer to the old time function. For both setting and getting, nullptr means |
+// using the default timing function returning the actual time. |
+WTF_EXPORT TimeFunction setTimeFunctionsForTesting(TimeFunction); |
} // namespace WTF |
using WTF::currentTime; |
using WTF::currentTimeMS; |
using WTF::monotonicallyIncreasingTime; |
+using WTF::TimeFunction; |
+using WTF::setTimeFunctionsForTesting; |
#endif // CurrentTime_h |