Home | History | Annotate | Download | only in time

Lines Matching full:time

33 // message loop waits have the same resolution that our time measurements
37 #include "base/time/time.h"
49 using base::Time;
65 DCHECK_GE(us, 0LL) << "Time is less than 0, negative values are not "
79 // Time between resampling the un-granular clock for this API. 60 seconds.
80 const int kMaxMillisecondsToAvoidDrift = 60 * Time::kMillisecondsPerSecond;
92 // Time -----------------------------------------------------------------------
94 // The internal representation of Time uses FILETIME, whose epoch is 1601-01-01
99 const int64 Time::kTimeTToMicrosecondsOffset = GG_INT64_C(11644473600000000);
101 bool Time::high_resolution_timer_enabled_ = false;
102 int Time::high_resolution_timer_activated_ = 0;
105 Time Time::Now() {
109 // We implement time using the high-resolution timers so that we can get
114 // counter (initial_ctr). To compute the initial time, we can check
122 // Calculate the time elapsed since we started our timer
125 // Check if enough time has elapsed that we need to resync the clock.
131 return Time(elapsed + Time(initial_time));
136 Time Time::NowFromSystemTime() {
139 return Time(initial_time);
143 Time Time::FromFileTime(FILETIME ft) {
145 return Time();
149 return Time(FileTimeToMicroseconds(ft));
152 FILETIME Time::ToFileTime() const {
167 void Time::EnableHighResolutionTimer(bool enable) {
179 bool Time::ActivateHighResolutionTimer(bool activating) {
198 bool Time::IsHighResolutionTimerInUse() {
209 Time Time::FromExploded(bool is_local, const Exploded& exploded) {
210 // Create the system struct representing our exploded time. It will either be
211 // in local time or UTC.
234 NOTREACHED() << "Unable to convert time";
235 return Time(0);
237 return Time(FileTimeToMicroseconds(ft));
240 void Time::Explode(bool is_local, Exploded* exploded) const {
251 // FILETIME in local time if necessary.
258 // settings for the time zone and daylight saving time. Therefore, if it is
259 // daylight saving time, it will take daylight saving time into account,
260 // even if the time you are converting is in standard time.
268 NOTREACHED() << "Unable to convert time, don't know why";
295 // Accumulation of time lost due to rollover (in milliseconds).
302 // Note: this is a global object, and we usually avoid these. However, the time
305 // gotchas). Its impact on startup time should be negligible due to low-level
306 // nature of time code.
325 // Overview of time counters:
327 // The CPU counter provides the highest resolution time stamp and is the least
335 // resolution (100 nanoseconds) time stamp but is comparatively more expensive
350 // (3) System time. The system time provides a low-resolution (typically 10ms
351 // to 55 milliseconds) time stamp but is comparatively less expensive to
389 int64 microseconds = (whole_seconds * Time::kMicrosecondsPerSecond) +
390 ((leftover_ticks * Time::kMicrosecondsPerSecond) /