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

Side by Side Diff: base/time_win.cc

Issue 10257020: Add interface to system trace clock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consolidate high res clock unit test code Created 8 years, 7 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
« no previous file with comments | « base/time_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 5
6 // Windows Timer Primer 6 // Windows Timer Primer
7 // 7 //
8 // A good article: http://www.ddj.com/windows/184416651 8 // A good article: http://www.ddj.com/windows/184416651
9 // A good mozilla bug: http://bugzilla.mozilla.org/show_bug.cgi?id=363258 9 // A good mozilla bug: http://bugzilla.mozilla.org/show_bug.cgi?id=363258
10 // 10 //
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 TimeTicks TimeTicks::Now() { 429 TimeTicks TimeTicks::Now() {
430 return TimeTicks() + RolloverProtectedNow(); 430 return TimeTicks() + RolloverProtectedNow();
431 } 431 }
432 432
433 // static 433 // static
434 TimeTicks TimeTicks::HighResNow() { 434 TimeTicks TimeTicks::HighResNow() {
435 return TimeTicks() + HighResNowSingleton::GetInstance()->Now(); 435 return TimeTicks() + HighResNowSingleton::GetInstance()->Now();
436 } 436 }
437 437
438 // static 438 // static
439 TimeTicks TimeTicks::NowFromSystemTraceTime() {
440 return HighResNow();
441 }
442
443 // static
439 int64 TimeTicks::GetQPCDriftMicroseconds() { 444 int64 TimeTicks::GetQPCDriftMicroseconds() {
440 return HighResNowSingleton::GetInstance()->GetQPCDriftMicroseconds(); 445 return HighResNowSingleton::GetInstance()->GetQPCDriftMicroseconds();
441 } 446 }
442 447
443 // static 448 // static
444 bool TimeTicks::IsHighResClockWorking() { 449 bool TimeTicks::IsHighResClockWorking() {
445 return HighResNowSingleton::GetInstance()->IsUsingHighResClock(); 450 return HighResNowSingleton::GetInstance()->IsUsingHighResClock();
446 } 451 }
OLDNEW
« no previous file with comments | « base/time_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698