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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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.h ('k') | base/timer/elapsed_timer.h » ('j') | 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // static 533 // static
534 TimeTicks TimeTicks::FromQPCValue(LONGLONG qpc_value) { 534 TimeTicks TimeTicks::FromQPCValue(LONGLONG qpc_value) {
535 return TimeTicks(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value)); 535 return TimeTicks(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value));
536 } 536 }
537 537
538 // static 538 // static
539 bool TimeTicks::IsHighResClockWorking() { 539 bool TimeTicks::IsHighResClockWorking() {
540 return GetHighResNowSingleton()->IsUsingHighResClock(); 540 return GetHighResNowSingleton()->IsUsingHighResClock();
541 } 541 }
542 542
543 TimeTicks TimeTicks::UnprotectedNow() {
544 if (now_function == HighResNowWrapper) {
545 return Now();
546 } else {
547 return TimeTicks() + TimeDelta::FromMilliseconds(timeGetTime());
548 }
549 }
550
551 // TimeDelta ------------------------------------------------------------------ 543 // TimeDelta ------------------------------------------------------------------
552 544
553 // static 545 // static
554 TimeDelta TimeDelta::FromQPCValue(LONGLONG qpc_value) { 546 TimeDelta TimeDelta::FromQPCValue(LONGLONG qpc_value) {
555 return TimeDelta(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value)); 547 return TimeDelta(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value));
556 } 548 }
OLDNEW
« no previous file with comments | « base/time/time.h ('k') | base/timer/elapsed_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698