lastFrameTime property

Duration get lastFrameTime

Duration of the last frame (time between renders).

Implementation

Duration get lastFrameTime {
  if (_frameTimeCount == 0) return Duration.zero;
  // Last written entry is at (_frameTimeIndex - 1) wrapped.
  final idx = (_frameTimeIndex - 1 + _sampleSize) % _sampleSize;
  return _frameTimes[idx];
}