averageFrameTime property
Duration
get
averageFrameTime
Average frame time over the sample window.
Implementation
Duration get averageFrameTime {
if (_frameTimes.isEmpty) return Duration.zero;
final total = _frameTimes.fold<int>(0, (sum, d) => sum + d.inMicroseconds);
return Duration(microseconds: total ~/ _frameTimes.length);
}