round method

  1. @useResult
OffsetTime round(
  1. TimeUnit unit,
  2. int value
)

Returns a copy of this rounded to the nearest unit and value.

OffsetTime(Offset(8), 12, 31, 59).round(TimeUnit.minutes, 5); // 12:30+08:00

OffsetTime(Offset(8), 12, 34, 59).round(TimeUnit.minutes, 5); // 12:35+08:00

Implementation

@useResult OffsetTime round(TimeUnit unit, int value) => OffsetTime._(offset, _native.round(unit, value));