| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 public: | 185 public: |
| 186 static const int64_t kMillisecondsPerSecond = 1000; | 186 static const int64_t kMillisecondsPerSecond = 1000; |
| 187 static const int64_t kMicrosecondsPerMillisecond = 1000; | 187 static const int64_t kMicrosecondsPerMillisecond = 1000; |
| 188 static const int64_t kMicrosecondsPerSecond = kMicrosecondsPerMillisecond * | 188 static const int64_t kMicrosecondsPerSecond = kMicrosecondsPerMillisecond * |
| 189 kMillisecondsPerSecond; | 189 kMillisecondsPerSecond; |
| 190 static const int64_t kMicrosecondsPerMinute = kMicrosecondsPerSecond * 60; | 190 static const int64_t kMicrosecondsPerMinute = kMicrosecondsPerSecond * 60; |
| 191 static const int64_t kMicrosecondsPerHour = kMicrosecondsPerMinute * 60; | 191 static const int64_t kMicrosecondsPerHour = kMicrosecondsPerMinute * 60; |
| 192 static const int64_t kMicrosecondsPerDay = kMicrosecondsPerHour * 24; | 192 static const int64_t kMicrosecondsPerDay = kMicrosecondsPerHour * 24; |
| 193 static const int64_t kMicrosecondsPerWeek = kMicrosecondsPerDay * 7; | 193 static const int64_t kMicrosecondsPerWeek = kMicrosecondsPerDay * 7; |
| 194 static const int64_t kNanosecondsPerMicrosecond = 1000; | 194 static const int64_t kNanosecondsPerMicrosecond = 1000; |
| 195 static const int64_t kNanosecondsPerMillisecond = kNanosecondsPerMicrosecond * |
| 196 kMicrosecondsPerMillisecond; |
| 195 static const int64_t kNanosecondsPerSecond = kNanosecondsPerMicrosecond * | 197 static const int64_t kNanosecondsPerSecond = kNanosecondsPerMicrosecond * |
| 196 kMicrosecondsPerSecond; | 198 kMicrosecondsPerSecond; |
| 197 | 199 |
| 198 // Contains the NULL time. Use Time::Now() to get the current time. | 200 // Contains the NULL time. Use Time::Now() to get the current time. |
| 199 Time() : us_(0) {} | 201 Time() : us_(0) {} |
| 200 | 202 |
| 201 // Returns true if the time object has not been initialized. | 203 // Returns true if the time object has not been initialized. |
| 202 bool IsNull() const { return us_ == 0; } | 204 bool IsNull() const { return us_ == 0; } |
| 203 | 205 |
| 204 // Returns true if the time object is the maximum time. | 206 // Returns true if the time object is the maximum time. |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 int64_t ticks_; | 409 int64_t ticks_; |
| 408 }; | 410 }; |
| 409 | 411 |
| 410 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) { | 412 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) { |
| 411 return ticks + delta; | 413 return ticks + delta; |
| 412 } | 414 } |
| 413 | 415 |
| 414 } } // namespace v8::internal | 416 } } // namespace v8::internal |
| 415 | 417 |
| 416 #endif // V8_PLATFORM_TIME_H_ | 418 #endif // V8_PLATFORM_TIME_H_ |
| OLD | NEW |