5 #ifndef V8_BASE_PLATFORM_ELAPSED_TIMER_H_ 6 #define V8_BASE_PLATFORM_ELAPSED_TIMER_H_ 8 #include "src/base/logging.h" 9 #include "src/base/platform/time.h" 44 bool IsStarted()
const {
45 DCHECK(started_ || start_ticks_.IsNull());
46 DCHECK(!started_ || !start_ticks_.IsNull());
47 return !start_ticks_.IsNull();
59 DCHECK_GE(elapsed.InMicroseconds(), 0);
70 DCHECK_GE(elapsed.InMicroseconds(), 0);
77 bool HasExpired(
TimeDelta time_delta)
const {
79 return Elapsed() >= time_delta;
84 TimeTicks now = TimeTicks::HighResolutionNow();
85 DCHECK(!now.IsNull());
98 #endif // V8_BASE_PLATFORM_ELAPSED_TIMER_H_