averageRenderDuration property

Duration get averageRenderDuration

Average render duration over the sample window.

Implementation

Duration get averageRenderDuration {
  final n = _renderTimeLength;
  if (n == 0) return Duration.zero;
  int total = 0;
  for (int i = 0; i < n; i++) {
    total += _renderTimes[i].inMicroseconds;
  }
  return Duration(microseconds: total ~/ n);
}