#include <stopwatch.h>
Classes | |
| class | RefreshRateUpdater |
The refresh rate interface for Stopwatch. More... | |
Public Member Functions | |
| Stopwatch (const RefreshRateUpdater &updater) | |
| ~Stopwatch () | |
| const fml::TimeDelta & | GetLap (size_t index) const |
| size_t | GetLapsCount () const |
| Return a reference to all the laps. | |
| size_t | GetCurrentSample () const |
| const fml::TimeDelta & | LastLap () const |
| fml::TimeDelta | MaxDelta () const |
| fml::TimeDelta | AverageDelta () const |
| void | Start () |
| void | Stop () |
| void | SetLapTime (const fml::TimeDelta &delta) |
| fml::Milliseconds | GetFrameBudget () const |
| All places which want to get frame_budget should call this function. | |
Static Public Attributes | |
| static const size_t | kMaxSamples = 120 |
Definition at line 17 of file stopwatch.h.
|
explicit |
The constructor with a updater parameter, it will update frame_budget everytime when GetFrameBudget() is called.
Definition at line 9 of file stopwatch.cc.
References kMaxSamples, and fml::TimeDelta::Zero().
|
default |
| fml::TimeDelta flutter::Stopwatch::AverageDelta | ( | ) | const |
Definition at line 77 of file stopwatch.cc.
References i, and kMaxSamples.
Referenced by flutter::PerformanceOverlayLayer::MakeStatisticsText().
| size_t flutter::Stopwatch::GetCurrentSample | ( | ) | const |
Definition at line 50 of file stopwatch.cc.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and flutter::DlStopwatchVisualizer::Visualize().
| fml::Milliseconds flutter::Stopwatch::GetFrameBudget | ( | ) | const |
All places which want to get frame_budget should call this function.
Definition at line 85 of file stopwatch.cc.
References flutter::Stopwatch::RefreshRateUpdater::GetFrameBudget().
Referenced by flutter::StopwatchVisualizer::StopwatchVisualizer(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| const fml::TimeDelta & flutter::Stopwatch::GetLap | ( | size_t | index | ) | const |
Definition at line 42 of file stopwatch.cc.
Referenced by flutter::testing::TEST(), and flutter::DlStopwatchVisualizer::Visualize().
| size_t flutter::Stopwatch::GetLapsCount | ( | ) | const |
Return a reference to all the laps.
Definition at line 46 of file stopwatch.cc.
Referenced by flutter::testing::TEST(), and flutter::DlStopwatchVisualizer::Visualize().
| const fml::TimeDelta & flutter::Stopwatch::LastLap | ( | ) | const |
Definition at line 38 of file stopwatch.cc.
Referenced by flutter::DlStopwatchVisualizer::Visualize().
| fml::TimeDelta flutter::Stopwatch::MaxDelta | ( | ) | const |
Definition at line 67 of file stopwatch.cc.
References i, and kMaxSamples.
Referenced by flutter::PerformanceOverlayLayer::MakeStatisticsText().
| void flutter::Stopwatch::SetLapTime | ( | const fml::TimeDelta & | delta | ) |
Definition at line 33 of file stopwatch.cc.
References kMaxSamples.
Referenced by Stop(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| void flutter::Stopwatch::Start | ( | ) |
Definition at line 25 of file stopwatch.cc.
References fml::TimePoint::Now().
Referenced by flutter::testing::TEST().
| void flutter::Stopwatch::Stop | ( | ) |
Definition at line 29 of file stopwatch.cc.
References fml::TimePoint::Now(), and SetLapTime().
Referenced by flutter::testing::TEST().
|
static |
Definition at line 20 of file stopwatch.h.
Referenced by AverageDelta(), MaxDelta(), SetLapTime(), Stopwatch(), flutter::testing::TEST(), and flutter::testing::TEST().