| Index: Source/wtf/CurrentTime.cpp
|
| diff --git a/Source/wtf/CurrentTime.cpp b/Source/wtf/CurrentTime.cpp
|
| index 8f6e07060323a12d7235f149f553dfb2303e7457..8586efee3373d9d16114199b015216b5e9fb2f68 100644
|
| --- a/Source/wtf/CurrentTime.cpp
|
| +++ b/Source/wtf/CurrentTime.cpp
|
| @@ -31,18 +31,29 @@
|
| #include "config.h"
|
| #include "wtf/CurrentTime.h"
|
|
|
| -#include <public/Platform.h>
|
| -
|
| namespace WTF {
|
|
|
| +static TimeFunction currentTimeFunction;
|
| +static TimeFunction monotonicallyIncreasingTimeFunction;
|
| +
|
| +void setCurrentTimeFunction(TimeFunction func)
|
| +{
|
| + currentTimeFunction = func;
|
| +}
|
| +
|
| +void setMonotonicallyIncreasingTimeFunction(TimeFunction func)
|
| +{
|
| + monotonicallyIncreasingTimeFunction = func;
|
| +}
|
| +
|
| double currentTime()
|
| {
|
| - return WebKit::Platform::current()->currentTime();
|
| + return (*currentTimeFunction)();
|
| }
|
|
|
| double monotonicallyIncreasingTime()
|
| {
|
| - return WebKit::Platform::current()->monotonicallyIncreasingTime();
|
| + return (*monotonicallyIncreasingTimeFunction)();
|
| }
|
|
|
| } // namespace WTF
|
|
|