coerceAtMost method

Duration coerceAtMost(
  1. Duration max
)

Ensures this duration is at most max.

Implementation

Duration coerceAtMost(Duration max) => this > max ? max : this;