effect-io-ai

Package: effect
Module: Duration

Duration.max

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

Signature

declare const max: { (that: Duration): (self: Duration) => Duration; (self: Duration, that: Duration): Duration; }

Source

Since v2.0.0