TimedBlock constructor

const TimedBlock({
  1. required String name,
  2. required double start,
  3. required double end,
})

Creates a timed block of code from a name, start, and end.

The name should be sufficiently unique and descriptive for someone to easily tell which part of code was measured.

Implementation

const TimedBlock({required this.name, required this.start, required this.end})
  : assert(end >= start, 'The start timestamp must not be greater than the end timestamp.');