RunningNornsTimer constructor
RunningNornsTimer({
- required NornsTimer timer,
- required NornsDuration startedAt,
Implementation
RunningNornsTimer({
required this.timer,
required this.startedAt,
}) {
final NornsDuration endAt;
if (timer.duration != null) {
endAt = startedAt + timer.duration!;
} else {
endAt = NornsDuration.max;
}
_points.addAll([
NornsPoint(point: startedAt, type: NornsPointType.timerStart),
if (timer.points != null)
...timer.points!.map((e) => e.shiftWith(startedAt)),
NornsPoint(
point: endAt,
type: NornsPointType.timerEnd,
),
]);
}