Home | History | Annotate | Download | only in time

Lines Matching full:time

5 #include "base/time/time.h"
20 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
24 return static_cast<int>(delta_ / Time::kMicrosecondsPerHour);
28 return static_cast<int>(delta_ / Time::kMicrosecondsPerMinute);
32 return static_cast<double>(delta_) / Time::kMicrosecondsPerSecond;
36 return delta_ / Time::kMicrosecondsPerSecond;
40 return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
44 return delta_ / Time::kMicrosecondsPerMillisecond;
48 return (delta_ + Time::kMicrosecondsPerMillisecond - 1) /
49 Time::kMicrosecondsPerMillisecond;
56 // Time -----------------------------------------------------------------------
59 Time Time::Max() {
60 return Time(std::numeric_limits<int64>::max());
64 Time Time::FromTimeT(time_t tt) {
66 return Time(); // Preserve 0 so we can tell it doesn't exist.
69 return Time((tt * kMicrosecondsPerSecond) + kTimeTToMicrosecondsOffset);
72 time_t Time::ToTimeT() const {
80 DLOG(WARNING) << "Overflow when converting base::Time with internal " <<
88 Time Time::FromDoubleT(double dt) {
90 return Time(); // Preserve 0 so we can tell it doesn't exist.
93 return Time(static_cast<int64>((dt *
98 double Time::ToDoubleT() const {
111 Time Time::FromTimeSpec(const timespec& ts) {
114 base::Time::kNanosecondsPerSecond);
119 Time Time::FromJsTime(double ms_since_epoch) {
120 // The epoch is a valid time, so this constructor doesn't interpret
121 // 0 as the null time.
124 return Time(static_cast<int64>(ms_since_epoch * kMicrosecondsPerMillisecond) +
128 double Time::ToJsTime() const {
142 Time Time::UnixEpoch() {
143 Time time;
144 time.us_ = kTimeTToMicrosecondsOffset;
145 return time;
148 Time Time::LocalMidnight() const {
159 bool Time::FromStringInternal(const char* time_string,
161 Time* parsed_time) {
175 *parsed_time = Time(result_time);
179 // Time::Exploded -------------------------------------------------------------
185 bool Time::Exploded::HasValidValues() const {