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

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

Issue 18063004: Move timing files into base/time, install forwarding headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios Created 7 years, 5 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/tick_clock.h ('k') | base/time/time.cc » ('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 // 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 the Windows epoch (1601-01-01 00:00:00 UTC) 6 // microseconds (s/1,000,000) since the Windows epoch (1601-01-01 00:00:00 UTC)
7 // (See http://crbug.com/14734). System-dependent clock interface routines are 7 // (See http://crbug.com/14734). System-dependent clock interface routines are
8 // defined in time_PLATFORM.cc. 8 // 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
11 // microseconds. 11 // microseconds.
12 // 12 //
13 // TimeTicks represents an abstract time that is most of the time incrementing 13 // TimeTicks represents an abstract time that is most of the time incrementing
14 // for use in measuring time durations. It is internally represented in 14 // for use in measuring time durations. It is internally represented in
15 // microseconds. It can not be converted to a human-readable time, but is 15 // microseconds. It can not be converted to a human-readable time, but is
16 // guaranteed not to decrease (if the user changes the computer clock, 16 // guaranteed not to decrease (if the user changes the computer clock,
17 // Time::Now() may actually decrease or jump). But note that TimeTicks may 17 // Time::Now() may actually decrease or jump). But note that TimeTicks may
18 // "stand still", for example if the computer suspended. 18 // "stand still", for example if the computer suspended.
19 // 19 //
20 // These classes are represented as only a 64-bit value, so they can be 20 // These classes are represented as only a 64-bit value, so they can be
21 // efficiently passed by value. 21 // efficiently passed by value.
22 22
23 #ifndef BASE_TIME_H_ 23 #ifndef BASE_TIME_TIME_H_
24 #define BASE_TIME_H_ 24 #define BASE_TIME_TIME_H_
25 25
26 #include <time.h> 26 #include <time.h>
27 27
28 #include "base/atomicops.h" 28 #include "base/atomicops.h"
29 #include "base/base_export.h" 29 #include "base/base_export.h"
30 #include "base/basictypes.h" 30 #include "base/basictypes.h"
31 31
32 #if defined(OS_MACOSX) 32 #if defined(OS_MACOSX)
33 #include <CoreFoundation/CoreFoundation.h> 33 #include <CoreFoundation/CoreFoundation.h>
34 // Avoid Mac system header macro leak. 34 // Avoid Mac system header macro leak.
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 static TickFunctionType SetMockTickFunction(TickFunctionType ticker); 641 static TickFunctionType SetMockTickFunction(TickFunctionType ticker);
642 #endif 642 #endif
643 }; 643 };
644 644
645 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 645 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
646 return TimeTicks(t.ticks_ + delta_); 646 return TimeTicks(t.ticks_ + delta_);
647 } 647 }
648 648
649 } // namespace base 649 } // namespace base
650 650
651 #endif // BASE_TIME_H_ 651 #endif // BASE_TIME_TIME_H_
OLDNEW
« no previous file with comments | « base/time/tick_clock.h ('k') | base/time/time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698