| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 a platform-dependent epoch. Each | 6 // microseconds (s/1,000,000) since a platform-dependent epoch. Each |
| 7 // platform's epoch, along with other system-dependent clock interface | 7 // platform's epoch, along with other system-dependent clock interface |
| 8 // routines, is defined in time_PLATFORM.cc. | 8 // routines, is 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "base/basictypes.h" | 27 #include "base/basictypes.h" |
| 28 #include "testing/gtest/include/gtest/gtest_prod.h" | 28 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 31 // For FILETIME in FromFileTime, until it moves to a new converter class. | 31 // For FILETIME in FromFileTime, until it moves to a new converter class. |
| 32 // See TODO(iyengar) below. | 32 // See TODO(iyengar) below. |
| 33 #include <windows.h> | 33 #include <windows.h> |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 namespace base { |
| 37 |
| 36 class Time; | 38 class Time; |
| 37 class TimeTicks; | 39 class TimeTicks; |
| 38 | 40 |
| 39 // This unit test does a lot of manual time manipulation. | 41 // This unit test does a lot of manual time manipulation. |
| 40 class PageLoadTrackerUnitTest; | 42 class PageLoadTrackerUnitTest; |
| 41 | 43 |
| 42 // TimeDelta ------------------------------------------------------------------ | 44 // TimeDelta ------------------------------------------------------------------ |
| 43 | 45 |
| 44 class TimeDelta { | 46 class TimeDelta { |
| 45 public: | 47 public: |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 #if defined(OS_WIN) | 433 #if defined(OS_WIN) |
| 432 typedef DWORD (*TickFunctionType)(void); | 434 typedef DWORD (*TickFunctionType)(void); |
| 433 static TickFunctionType SetMockTickFunction(TickFunctionType ticker); | 435 static TickFunctionType SetMockTickFunction(TickFunctionType ticker); |
| 434 #endif | 436 #endif |
| 435 }; | 437 }; |
| 436 | 438 |
| 437 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { | 439 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { |
| 438 return TimeTicks(t.ticks_ + delta_); | 440 return TimeTicks(t.ticks_ + delta_); |
| 439 } | 441 } |
| 440 | 442 |
| 443 } // namespace base |
| 444 |
| 441 #endif // BASE_TIME_H_ | 445 #endif // BASE_TIME_H_ |
| OLD | NEW |