| Index: sky/engine/wtf/CurrentTime.cpp
|
| diff --git a/sky/engine/wtf/CurrentTime.cpp b/sky/engine/wtf/CurrentTime.cpp
|
| index b9e9e5e6154a63e0d48f4413e8d4dd4773baa583..638f4bcb242550c16788c213678049503b4d1898 100644
|
| --- a/sky/engine/wtf/CurrentTime.cpp
|
| +++ b/sky/engine/wtf/CurrentTime.cpp
|
| @@ -28,32 +28,21 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| +#include "base/time/time.h"
|
| #include "sky/engine/config.h"
|
| #include "sky/engine/wtf/CurrentTime.h"
|
|
|
| namespace WTF {
|
|
|
| -static TimeFunction currentTimeFunction;
|
| -static TimeFunction monotonicallyIncreasingTimeFunction;
|
| -
|
| -void setCurrentTimeFunction(TimeFunction func)
|
| -{
|
| - currentTimeFunction = func;
|
| -}
|
| -
|
| -void setMonotonicallyIncreasingTimeFunction(TimeFunction func)
|
| -{
|
| - monotonicallyIncreasingTimeFunction = func;
|
| -}
|
| -
|
| double currentTime()
|
| {
|
| - return (*currentTimeFunction)();
|
| + return base::Time::Now().ToDoubleT();
|
| }
|
|
|
| double monotonicallyIncreasingTime()
|
| {
|
| - return (*monotonicallyIncreasingTimeFunction)();
|
| + return base::TimeTicks::Now().ToInternalValue() /
|
| + static_cast<double>(base::Time::kMicrosecondsPerSecond);
|
| }
|
|
|
| } // namespace WTF
|
|
|