Chromium Code Reviews| Index: base/time/time.h |
| diff --git a/base/time/time.h b/base/time/time.h |
| index b09cd9ef8d09e55c1d13a3101fb25bcb51552df9..088899513b35fd4abd743590bed967d0fe0e3fdf 100644 |
| --- a/base/time/time.h |
| +++ b/base/time/time.h |
| @@ -115,6 +115,9 @@ class BASE_EXPORT TimeDelta { |
| static constexpr TimeDelta FromSecondsD(double secs); |
| static constexpr TimeDelta FromMillisecondsD(double ms); |
| static constexpr TimeDelta FromMicroseconds(int64_t us); |
| +#if defined(OS_POSIX) |
| + static TimeDelta FromTimeSpec(const timespec& ts); |
| +#endif |
| #if defined(OS_WIN) |
| static TimeDelta FromQPCValue(LONGLONG qpc_value); |
| #endif |
| @@ -732,6 +735,10 @@ class BASE_EXPORT TimeTicks : public time_internal::TimeBase<TimeTicks> { |
| static TimeTicks FromQPCValue(LONGLONG qpc_value); |
| #endif |
| +#if defined(OS_MACOSX) |
|
miu
2016/09/16 18:35:58
To prevent accidental use of this function on IOS:
jameswest
2016/09/19 23:32:36
Done.
|
| + static TimeTicks FromMachAbsoluteTime(uint64_t mach_absolute_time); |
| +#endif |
| + |
| // Get an estimate of the TimeTick value at the time of the UnixEpoch. Because |
| // Time and TimeTicks respond differently to user-set time and NTP |
| // adjustments, this number is only an estimate. Nevertheless, this can be |