Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: base/time.h

Issue 3347005: Moving file_util::FileInfo to base::PlatformFileInfo, and adding the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Time represents an absolute point in time, internally represented as 5 // Time represents an absolute point in time, internally represented as
6 // microseconds (s/1,000,000) since a platform-dependent epoch. Each 6 // microseconds (s/1,000,000) since a platform-dependent epoch. Each
7 // platform's epoch, along with other system-dependent clock interface 7 // platform's epoch, along with other system-dependent clock interface
8 // routines, is defined in time_PLATFORM.cc. 8 // routines, is defined in time_PLATFORM.cc.
9 // 9 //
10 // TimeDelta represents a duration of time, internally represented in 10 // TimeDelta represents a duration of time, internally represented in
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 static Time FromDoubleT(double dt); 252 static Time FromDoubleT(double dt);
253 double ToDoubleT() const; 253 double ToDoubleT() const;
254 254
255 #if defined(OS_POSIX) 255 #if defined(OS_POSIX)
256 struct timeval ToTimeVal() const; 256 struct timeval ToTimeVal() const;
257 #endif 257 #endif
258 258
259 #if defined(OS_WIN) 259 #if defined(OS_WIN)
260 static Time FromFileTime(FILETIME ft); 260 static Time FromFileTime(FILETIME ft);
261 FILETIME ToFileTime() const; 261 FILETIME ToFileTime() const;
262 static Time FromLargeInteger(LARGE_INTEGER li);
262 263
263 // The minimum time of a low resolution timer. This is basically a windows 264 // The minimum time of a low resolution timer. This is basically a windows
264 // constant of ~15.6ms. While it does vary on some older OS versions, we'll 265 // constant of ~15.6ms. While it does vary on some older OS versions, we'll
265 // treat it as static across all windows versions. 266 // treat it as static across all windows versions.
266 static const int kMinLowResolutionThresholdMs = 16; 267 static const int kMinLowResolutionThresholdMs = 16;
267 268
268 // Enable or disable Windows high resolution timer. If the high resolution 269 // Enable or disable Windows high resolution timer. If the high resolution
269 // timer is not enabled, calls to ActivateHighResolutionTimer will fail. 270 // timer is not enabled, calls to ActivateHighResolutionTimer will fail.
270 // When disabling the high resolution timer, this function will not cause 271 // When disabling the high resolution timer, this function will not cause
271 // the high resolution timer to be deactivated, but will prevent future 272 // the high resolution timer to be deactivated, but will prevent future
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 #endif 541 #endif
541 }; 542 };
542 543
543 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 544 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
544 return TimeTicks(t.ticks_ + delta_); 545 return TimeTicks(t.ticks_ + delta_);
545 } 546 }
546 547
547 } // namespace base 548 } // namespace base
548 549
549 #endif // BASE_TIME_H_ 550 #endif // BASE_TIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698