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

Side by Side Diff: base/time/time_win.cc

Issue 27317002: base: Add base::TimeTicks::IsHighResNowFastAndReliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@reenableHeavyPage
Patch Set: Fix link errors Created 7 years, 2 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
« no previous file with comments | « base/time/time_posix.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 TimeTicks TimeTicks::Now() { 482 TimeTicks TimeTicks::Now() {
483 return TimeTicks() + now_function(); 483 return TimeTicks() + now_function();
484 } 484 }
485 485
486 // static 486 // static
487 TimeTicks TimeTicks::HighResNow() { 487 TimeTicks TimeTicks::HighResNow() {
488 return TimeTicks() + HighResNowSingleton::GetInstance()->Now(); 488 return TimeTicks() + HighResNowSingleton::GetInstance()->Now();
489 } 489 }
490 490
491 // static 491 // static
492 bool TimeTicks::IsHighResNowFastAndReliable() {
493 return CPUReliablySupportsHighResTime();
494 }
495
496 // static
492 TimeTicks TimeTicks::ThreadNow() { 497 TimeTicks TimeTicks::ThreadNow() {
493 NOTREACHED(); 498 NOTREACHED();
494 return TimeTicks(); 499 return TimeTicks();
495 } 500 }
496 501
497 // static 502 // static
498 TimeTicks TimeTicks::NowFromSystemTraceTime() { 503 TimeTicks TimeTicks::NowFromSystemTraceTime() {
499 return HighResNow(); 504 return HighResNow();
500 } 505 }
501 506
(...skipping 21 matching lines...) Expand all
523 } 528 }
524 } 529 }
525 530
526 // TimeDelta ------------------------------------------------------------------ 531 // TimeDelta ------------------------------------------------------------------
527 532
528 // static 533 // static
529 TimeDelta TimeDelta::FromQPCValue(LONGLONG qpc_value) { 534 TimeDelta TimeDelta::FromQPCValue(LONGLONG qpc_value) {
530 return TimeDelta( 535 return TimeDelta(
531 HighResNowSingleton::GetInstance()->QPCValueToMicroseconds(qpc_value)); 536 HighResNowSingleton::GetInstance()->QPCValueToMicroseconds(qpc_value));
532 } 537 }
OLDNEW
« no previous file with comments | « base/time/time_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698