Hyperlinkv0.8.0-beta.28

Duration

Duration.maxconsteffect/Duration.ts:1255
(that: Duration): (self: Duration) => Duration
(self: Duration, that: Duration): Duration

Returns the larger of two Durations.

Example (Selecting the longer duration)

import { Duration } from "effect"

const longer = Duration.max(Duration.seconds(5), Duration.seconds(3))
console.log(Duration.toSeconds(longer)) // 5
ordering
export const max: {
  (that: Duration): (self: Duration) => Duration
  (self: Duration, that: Duration): Duration
} = order.max(Order)