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 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // lap, where n = check_interval. | 42 // lap, where n = check_interval. |
43 bool HasTimedAllLaps(); | 43 bool HasTimedAllLaps(); |
44 // The average milliseconds per lap. | 44 // The average milliseconds per lap. |
45 float MsPerLap(); | 45 float MsPerLap(); |
46 // The number of laps per second. | 46 // The number of laps per second. |
47 float LapsPerSecond(); | 47 float LapsPerSecond(); |
48 // The number of laps recorded. | 48 // The number of laps recorded. |
49 int NumLaps(); | 49 int NumLaps(); |
50 | 50 |
51 private: | 51 private: |
52 base::TimeTicks start_time_; | 52 base::TimeDelta start_time_; |
53 base::TimeDelta accumulator_; | 53 base::TimeDelta accumulator_; |
54 int num_laps_; | 54 int num_laps_; |
55 int warmup_laps_; | 55 int warmup_laps_; |
56 int remaining_warmups_; | 56 int remaining_warmups_; |
57 int remaining_no_check_laps_; | 57 int remaining_no_check_laps_; |
58 base::TimeDelta time_limit_; | 58 base::TimeDelta time_limit_; |
59 int check_interval_; | 59 int check_interval_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(LapTimer); | 61 DISALLOW_COPY_AND_ASSIGN(LapTimer); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace cc | 64 } // namespace cc |
65 | 65 |
66 #endif // CC_DEBUG_LAP_TIMER_H_ | 66 #endif // CC_DEBUG_LAP_TIMER_H_ |
OLD | NEW |