Index: base/time.h |
diff --git a/base/time.h b/base/time.h |
index 78d7456b68ae273c3bf27e8aaf93cd3742efe02c..09788326895ea64604c62a4e165edcfd541a6aa7 100644 |
--- a/base/time.h |
+++ b/base/time.h |
@@ -638,6 +638,20 @@ inline TimeTicks TimeDelta::operator+(TimeTicks t) const { |
return TimeTicks(t.ticks_ + delta_); |
} |
+// TimeFactory ---------------------------------------------------------------- |
+ |
+class BASE_EXPORT TimeFactory { |
+ public: |
+ virtual Time TimeNow() = 0; |
+ virtual TimeTicks TimeTicksNow() = 0; |
+ virtual TimeTicks TimeTicksHighResNow() = 0; |
+ |
+ static TimeFactory* instance() { return instance_; } |
+ |
+ protected: |
+ static TimeFactory* instance_; |
+}; |
+ |
} // namespace base |
#endif // BASE_TIME_H_ |