| Index: src/platform/time.h
|
| diff --git a/src/platform/time.h b/src/platform/time.h
|
| index 57b894d814b87b862d1e8c687000fd89829218d3..a0d5425b1949a5ce11fcae151834b34d2df6b2ef 100644
|
| --- a/src/platform/time.h
|
| +++ b/src/platform/time.h
|
| @@ -36,6 +36,8 @@
|
| // Forward declarations.
|
| extern "C" {
|
| struct _FILETIME;
|
| +struct mach_timespec;
|
| +struct timespec;
|
| struct timeval;
|
| }
|
|
|
| @@ -82,6 +84,10 @@ class TimeDelta V8_FINAL BASE_EMBEDDED {
|
| int64_t InMicroseconds() const { return delta_; }
|
| int64_t InNanoseconds() const;
|
|
|
| + // Converts to/from Mach time specs.
|
| + static TimeDelta FromMachTimespec(struct mach_timespec ts);
|
| + struct mach_timespec ToMachTimespec() const;
|
| +
|
| TimeDelta& operator=(const TimeDelta& other) {
|
| delta_ = other.delta_;
|
| return *this;
|
| @@ -212,6 +218,10 @@ class Time V8_FINAL BASE_EMBEDDED {
|
| // with which we might compare it.
|
| static Time Max() { return Time(std::numeric_limits<int64_t>::max()); }
|
|
|
| + // Converts to/from POSIX time specs.
|
| + static Time FromTimespec(struct timespec ts);
|
| + struct timespec ToTimespec() const;
|
| +
|
| // Converts to/from POSIX time values.
|
| static Time FromTimeval(struct timeval tv);
|
| struct timeval ToTimeval() const;
|
|
|