diff options
author | ksakamoto <ksakamoto@chromium.org> | 2015-05-06 21:35:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-07 04:36:04 +0000 |
commit | a365825583412c355a449274bec70e41e992ffd7 (patch) | |
tree | 32148bdb6a3b0f1cc7a20b9b3b36ddbc70a5e3bc /base/time/time_unittest.cc | |
parent | 933968726534bf7a48e52d28a15223cb3a583e86 (diff) | |
download | chromium_src-a365825583412c355a449274bec70e41e992ffd7.zip chromium_src-a365825583412c355a449274bec70e41e992ffd7.tar.gz chromium_src-a365825583412c355a449274bec70e41e992ffd7.tar.bz2 |
Revert of Fixit: Factor out common base::Time* math operator overloads. (patchset #2 id:40001 of https://codereview.chromium.org/1122443004/)
Reason for revert:
Broke iOS build.
http://build.chromium.org/p/chromium.mac/builders/iOS_Device/builds/5621/steps/compile/logs/stdio
Original issue's description:
> Fixit: Factor out common base::Time* math operator overloads.
>
> This is part 1 of a 2-part change to fork base::TimeTicks into three
> type-checked time classes (TimeTicks + ThreadTicks + TraceTicks). The
> forking of TimeTicks will ensure values from different clocks are not
> erroneously being mixed together when doing time math.
>
> In this change, the identical comparison and math operator overloads
> found in base::Time and base::TimeTicks are being factored-out into a
> templated base class. In a following change, this base class will also
> be used to de-dupe this common functionality in the two new time
> classes.
>
> BUG=467417
>
> Committed: https://crrev.com/7ca717095b4758cb76e53e904b775852e46d646d
> Cr-Commit-Position: refs/heads/master@{#328696}
TBR=thestig@chromium.org,miu@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=467417
Review URL: https://codereview.chromium.org/1130953002
Cr-Commit-Position: refs/heads/master@{#328706}
Diffstat (limited to 'base/time/time_unittest.cc')
-rw-r--r-- | base/time/time_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/time/time_unittest.cc b/base/time/time_unittest.cc index 456782c..6c12423 100644 --- a/base/time/time_unittest.cc +++ b/base/time/time_unittest.cc @@ -717,7 +717,7 @@ TEST(TimeTicks, NowFromSystemTraceTime) { TEST(TimeTicks, SnappedToNextTickBasic) { base::TimeTicks phase = base::TimeTicks::FromInternalValue(4000); - base::TimeDelta interval = base::TimeDelta::FromMicroseconds(1000); + base::TimeDelta interval = base::TimeDelta::FromInternalValue(1000); base::TimeTicks timestamp; // Timestamp in previous interval. @@ -760,7 +760,7 @@ TEST(TimeTicks, SnappedToNextTickOverflow) { // int(big_timestamp / interval) < 0, so this causes a crash if the number of // intervals elapsed is attempted to be stored in an int. base::TimeTicks phase = base::TimeTicks::FromInternalValue(0); - base::TimeDelta interval = base::TimeDelta::FromMicroseconds(4000); + base::TimeDelta interval = base::TimeDelta::FromInternalValue(4000); base::TimeTicks big_timestamp = base::TimeTicks::FromInternalValue(8635916564000); |