Index: base/time_posix.cc |
diff --git a/base/time_posix.cc b/base/time_posix.cc |
index b6a12501212e64cee0686d0aaa6d04d581b141dd..a842e7dadf411aa0ca380d6fe9e3d6bdea7c4927 100644 |
--- a/base/time_posix.cc |
+++ b/base/time_posix.cc |
@@ -111,6 +111,9 @@ const int64 Time::kTimeTToMicrosecondsOffset = kWindowsEpochDeltaMicroseconds; |
// static |
Time Time::Now() { |
+ if (TimeFactory::instance()) |
+ return TimeFactory::instance()->TimeNow(); |
+ |
struct timeval tv; |
struct timezone tz = { 0, 0 }; // UTC |
if (gettimeofday(&tv, &tz) != 0) { |
@@ -237,6 +240,9 @@ Time Time::FromExploded(bool is_local, const Exploded& exploded) { |
// static |
TimeTicks TimeTicks::Now() { |
+ if (TimeFactory::instance()) |
+ return TimeFactory::instance()->TimeTicksNow(); |
+ |
uint64_t absolute_micro; |
struct timespec ts; |