maxFps property

double get maxFps

Maximum FPS in the sample window (fastest frame).

Implementation

double get maxFps {
  if (_frameTimes.isEmpty) return 0.0;
  final minTime = _frameTimes.reduce(
    (a, b) => a.inMicroseconds < b.inMicroseconds ? a : b,
  );
  if (minTime.inMicroseconds == 0) return double.infinity;
  return 1000000.0 / minTime.inMicroseconds;
}