roundToSeconds method

Duration roundToSeconds()

Rounds the duration to the nearest second.

Implementation

Duration roundToSeconds() =>
    Duration(seconds: (inMilliseconds / 1000).round());