Lines Matching refs:Time
19 return TimeDelta(ts.tv_sec * Time::kMicrosecondsPerSecond + in FromTimeSpec()
20 ts.tv_nsec / Time::kNanosecondsPerMicrosecond); in FromTimeSpec()
26 if (microseconds >= Time::kMicrosecondsPerSecond) { in ToTimeSpec()
28 microseconds -= seconds * Time::kMicrosecondsPerSecond; in ToTimeSpec()
32 static_cast<long>(microseconds * Time::kNanosecondsPerMicrosecond)}; in ToTimeSpec()
37 Time Time::FromTimeVal(struct timeval t) { in FromTimeVal()
38 DCHECK_LT(t.tv_usec, static_cast<int>(Time::kMicrosecondsPerSecond)); in FromTimeVal()
41 return Time(); in FromTimeVal()
42 if (t.tv_usec == static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1 && in FromTimeVal()
45 return Time((static_cast<int64_t>(t.tv_sec) * Time::kMicrosecondsPerSecond) + in FromTimeVal()
49 struct timeval Time::ToTimeVal() const { in ToTimeVal()
58 result.tv_usec = static_cast<suseconds_t>(Time::kMicrosecondsPerSecond) - 1; in ToTimeVal()
62 result.tv_sec = us / Time::kMicrosecondsPerSecond; in ToTimeVal()
63 result.tv_usec = us % Time::kMicrosecondsPerSecond; in ToTimeVal()