// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_TIMER_LAP_TIMER_H_ #define BASE_TIMER_LAP_TIMER_H_ #include "base/base_export.h" #include "base/sequence_checker.h" #include "base/time/time.h" namespace base { // LapTimer is used to calculate average times per "Lap" in perf tests. // NextLap increments the lap counter, used in counting the per lap averages. // If you initialize the LapTimer with a non zero |warmup_laps|, it will ignore // the times for that many laps at the start. // If you set the |time_limit| then you can use HasTimeLimitExpired() to see if // the current accumulated time has crossed that threshold, with an optimization // that it only tests this every |check_interval| laps. // // See base/timer/lap_timer_unittest.cc for a usage example. // class BASE_EXPORT LapTimer { … }; } // namespace base #endif // BASE_TIMER_LAP_TIMER_H_