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

Side by Side Diff: base/time/time.h

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
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 // Time represents an absolute point in coordinated universal time (UTC), 5 // Time represents an absolute point in coordinated universal time (UTC),
6 // internally represented as microseconds (s/1,000,000) since the Windows epoch 6 // internally represented as microseconds (s/1,000,000) since the Windows epoch
7 // (1601-01-01 00:00:00 UTC) (See http://crbug.com/14734). System-dependent 7 // (1601-01-01 00:00:00 UTC) (See http://crbug.com/14734). System-dependent
8 // clock interface routines are defined in time_PLATFORM.cc. 8 // clock interface routines are 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 627
628 #if defined(OS_WIN) 628 #if defined(OS_WIN)
629 // Get the absolute value of QPC time drift. For testing. 629 // Get the absolute value of QPC time drift. For testing.
630 static int64 GetQPCDriftMicroseconds(); 630 static int64 GetQPCDriftMicroseconds();
631 631
632 static TimeTicks FromQPCValue(LONGLONG qpc_value); 632 static TimeTicks FromQPCValue(LONGLONG qpc_value);
633 633
634 // Returns true if the high resolution clock is working on this system. 634 // Returns true if the high resolution clock is working on this system.
635 // This is only for testing. 635 // This is only for testing.
636 static bool IsHighResClockWorking(); 636 static bool IsHighResClockWorking();
637
638 // Returns a time value that is NOT rollover protected.
639 static TimeTicks UnprotectedNow();
640 #endif 637 #endif
641 638
642 // Returns true if this object has not been initialized. 639 // Returns true if this object has not been initialized.
643 bool is_null() const { 640 bool is_null() const {
644 return ticks_ == 0; 641 return ticks_ == 0;
645 } 642 }
646 643
647 // Converts an integer value representing TimeTicks to a class. This is used 644 // Converts an integer value representing TimeTicks to a class. This is used
648 // when deserializing a |TimeTicks| structure, using a value known to be 645 // when deserializing a |TimeTicks| structure, using a value known to be
649 // compatible. It is not provided as a constructor because the integer type 646 // compatible. It is not provided as a constructor because the integer type
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 731 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
735 return TimeTicks(t.ticks_ + delta_); 732 return TimeTicks(t.ticks_ + delta_);
736 } 733 }
737 734
738 // For logging use only. 735 // For logging use only.
739 BASE_EXPORT std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks); 736 BASE_EXPORT std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks);
740 737
741 } // namespace base 738 } // namespace base
742 739
743 #endif // BASE_TIME_TIME_H_ 740 #endif // BASE_TIME_TIME_H_
OLDNEW
« no previous file with comments | « base/test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java ('k') | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698