Lines Matching defs:Time

5 // Time represents an absolute point in coordinated universal time (UTC),
17 // Time::Now() may actually decrease or jump). But note that TimeTicks may
53 class Time;
167 Time operator+(Time t) const;
191 friend class Time;
209 // Time -----------------------------------------------------------------------
212 class BASE_EXPORT Time {
256 // Exploded value can be successfully converted to a Time value.
260 // Contains the NULL time. Use Time::Now() to get the current time.
261 Time() : us_(0) {
275 static Time UnixEpoch();
280 static Time Now();
284 static Time Max();
290 static Time NowFromSystemTime();
292 // Converts to/from time_t in UTC and a Time class.
293 // TODO(brettw) this should be removed once everybody starts using the |Time|
295 static Time FromTimeT(time_t tt);
301 // initialized", we map it to empty Time object that also means "not
303 static Time FromDoubleT(double dt);
311 static Time FromTimeSpec(const timespec& ts);
317 static Time FromJsTime(double ms_since_epoch);
325 static Time FromTimeVal(struct timeval t);
330 static Time FromCFAbsoluteTime(CFAbsoluteTime t);
335 static Time FromFileTime(FILETIME ft);
362 // into a Time class.
363 static Time FromUTCExploded(const Exploded& exploded) {
366 static Time FromLocalExploded(const Exploded& exploded) {
370 // Converts an integer value representing Time to a class. This is used
371 // when deserializing a |Time| structure, using a value known to be
374 static Time FromInternalValue(int64 us) {
375 return Time(us);
378 // Converts a string representation of time to a Time object.
386 static bool FromString(const char* time_string, Time* parsed_time) {
389 static bool FromUTCString(const char* time_string, Time* parsed_time) {
411 Time LocalMidnight() const;
413 Time& operator=(Time other) {
419 TimeDelta operator-(Time other) const {
424 Time& operator+=(TimeDelta delta) {
428 Time& operator-=(TimeDelta delta) {
434 Time operator+(TimeDelta delta) const {
435 return Time(us_ + delta.delta_);
437 Time operator-(TimeDelta delta) const {
438 return Time(us_ - delta.delta_);
442 bool operator==(Time other) const {
445 bool operator!=(Time other) const {
448 bool operator<(Time other) const {
451 bool operator<=(Time other) const {
454 bool operator>(Time other) const {
457 bool operator>=(Time other) const {
464 explicit Time(int64 us) : us_(us) {
473 static Time FromExploded(bool is_local, const Exploded& exploded);
475 // Converts a string representation of time to a Time object.
484 Time* parsed_time);
490 // Time in microseconds in UTC.
501 return TimeDelta(days * Time::kMicrosecondsPerDay);
509 return TimeDelta(hours * Time::kMicrosecondsPerHour);
517 return TimeDelta(minutes * Time::kMicrosecondsPerMinute);
525 return TimeDelta(secs * Time::kMicrosecondsPerSecond);
533 return TimeDelta(ms * Time::kMicrosecondsPerMillisecond);
541 return TimeDelta(secs * Time::kMicrosecondsPerSecond);
549 return TimeDelta(ms * Time::kMicrosecondsPerMillisecond);
560 inline Time TimeDelta::operator+(Time t) const {
561 return Time(t.us_ + delta_);