Home | History | Annotate | Download | only in time

Lines Matching refs:Time

5 #include "base/time/time.h"
34 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
42 return static_cast<int>(delta_ / Time::kMicrosecondsPerHour);
50 return static_cast<int>(delta_ / Time::kMicrosecondsPerMinute);
58 return static_cast<double>(delta_) / Time::kMicrosecondsPerSecond;
66 return delta_ / Time::kMicrosecondsPerSecond;
74 return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
82 return delta_ / Time::kMicrosecondsPerMillisecond;
90 return (delta_ + Time::kMicrosecondsPerMillisecond - 1) /
91 Time::kMicrosecondsPerMillisecond;
136 // Time -----------------------------------------------------------------------
139 Time Time::Max() {
140 return Time(std::numeric_limits<int64_t>::max());
144 Time Time::FromTimeT(time_t tt) {
146 return Time(); // Preserve 0 so we can tell it doesn't exist.
149 return Time(kTimeTToMicrosecondsOffset) + TimeDelta::FromSeconds(tt);
152 time_t Time::ToTimeT() const {
160 DLOG(WARNING) << "Overflow when converting base::Time with internal " <<
168 Time Time::FromDoubleT(double dt) {
170 return Time(); // Preserve 0 so we can tell it doesn't exist.
171 return Time(kTimeTToMicrosecondsOffset) + TimeDelta::FromSecondsD(dt);
174 double Time::ToDoubleT() const {
187 Time Time::FromTimeSpec(const timespec& ts) {
190 base::Time::kNanosecondsPerSecond);
195 Time Time::FromJsTime(double ms_since_epoch) {
196 // The epoch is a valid time, so this constructor doesn't interpret
197 // 0 as the null time.
198 return Time(kTimeTToMicrosecondsOffset) +
202 double Time::ToJsTime() const {
215 int64_t Time::ToJavaTime() const {
229 Time Time::UnixEpoch() {
230 Time time;
231 time.us_ = kTimeTToMicrosecondsOffset;
232 return time;
235 Time Time::LocalMidnight() const {
246 bool Time::FromStringInternal(const char* time_string,
248 Time* parsed_time) {
262 *parsed_time = Time(result_time);
266 std::ostream& operator<<(std::ostream& os, Time time) {
267 Time::Exploded exploded;
268 time.UTCExplode(&exploded);
280 // Local helper class to hold the conversion from Time to TickTime at the
281 // time of the Unix epoch.
285 : unix_epoch_(TimeTicks::Now() - (Time::Now() - Time::UnixEpoch())) {}
331 // Time::Exploded -------------------------------------------------------------
337 bool Time::Exploded::HasValidValues() const {