| 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 c0489f5065c68fb619226e8db34f6aa6bff3c5d0..a975ac57a1919228437f2b2931a1398d4ec20791 100644
|
| --- a/third_party/WebKit/Source/wtf/CurrentTime.h
|
| +++ b/third_party/WebKit/Source/wtf/CurrentTime.h
|
| @@ -55,11 +55,12 @@ WTF_EXPORT double monotonicallyIncreasingTime();
|
| // system.
|
| WTF_EXPORT double systemTraceTime();
|
|
|
| -typedef double(*TimeFunction)(void);
|
| -void setCurrentTimeFunction(TimeFunction);
|
| -WTF_EXPORT void setMonotonicallyIncreasingTimeFunction(TimeFunction);
|
| -void setSystemTraceTimeFunction(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
|
|
|
| @@ -67,5 +68,7 @@ using WTF::currentTime;
|
| using WTF::currentTimeMS;
|
| using WTF::monotonicallyIncreasingTime;
|
| using WTF::systemTraceTime;
|
| +using WTF::TimeFunction;
|
| +using WTF::setTimeFunctionsForTesting;
|
|
|
| #endif // CurrentTime_h
|
|
|