OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "cc/test/lap_timer.h" | 5 #include "cc/debug/lap_timer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 base::TimeTicks Now() { | 13 base::TimeTicks Now() { |
14 return base::TimeTicks::IsThreadNowSupported() | 14 return base::TimeTicks::IsThreadNowSupported() |
15 ? base::TimeTicks::ThreadNow() | 15 ? base::TimeTicks::ThreadNow() |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 float LapTimer::LapsPerSecond() { | 74 float LapTimer::LapsPerSecond() { |
75 DCHECK(HasTimedAllLaps()); | 75 DCHECK(HasTimedAllLaps()); |
76 return num_laps_ / accumulator_.InSecondsF(); | 76 return num_laps_ / accumulator_.InSecondsF(); |
77 } | 77 } |
78 | 78 |
79 int LapTimer::NumLaps() { return num_laps_; } | 79 int LapTimer::NumLaps() { return num_laps_; } |
80 | 80 |
81 } // namespace cc | 81 } // namespace cc |
OLD | NEW |