OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CC_DEBUG_LAP_TIMER_H_ | 5 #ifndef CC_DEBUG_LAP_TIMER_H_ |
6 #define CC_DEBUG_LAP_TIMER_H_ | 6 #define CC_DEBUG_LAP_TIMER_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
(...skipping 28 matching lines...) Expand all Loading... |
39 // lap, where n = check_interval. | 39 // lap, where n = check_interval. |
40 bool HasTimedAllLaps(); | 40 bool HasTimedAllLaps(); |
41 // The average milliseconds per lap. | 41 // The average milliseconds per lap. |
42 float MsPerLap(); | 42 float MsPerLap(); |
43 // The number of laps per second. | 43 // The number of laps per second. |
44 float LapsPerSecond(); | 44 float LapsPerSecond(); |
45 // The number of laps recorded. | 45 // The number of laps recorded. |
46 int NumLaps(); | 46 int NumLaps(); |
47 | 47 |
48 private: | 48 private: |
49 base::TimeTicks start_time_; | 49 base::TimeDelta start_time_; |
50 base::TimeDelta accumulator_; | 50 base::TimeDelta accumulator_; |
51 int num_laps_; | 51 int num_laps_; |
52 int warmup_laps_; | 52 int warmup_laps_; |
53 int remaining_warmups_; | 53 int remaining_warmups_; |
54 int remaining_no_check_laps_; | 54 int remaining_no_check_laps_; |
55 base::TimeDelta time_limit_; | 55 base::TimeDelta time_limit_; |
56 int check_interval_; | 56 int check_interval_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(LapTimer); | 58 DISALLOW_COPY_AND_ASSIGN(LapTimer); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace cc | 61 } // namespace cc |
62 | 62 |
63 #endif // CC_DEBUG_LAP_TIMER_H_ | 63 #endif // CC_DEBUG_LAP_TIMER_H_ |
OLD | NEW |