DHUDurationExt extension

Extensions for Duration formatting and scheduling helpers.

on

Properties

ago DateTime

Available on Duration, provided by the DHUDurationExt extension

Subtracts the Duration from the current DateTime and returns a DateTime in the past
no setter
fromNow DateTime

Available on Duration, provided by the DHUDurationExt extension

Adds the Duration to the current DateTime and returns a DateTime in the future
no setter

Methods

delayed<T extends Object?>([FutureOr<T> computation()?]) Future<T>

Available on Duration, provided by the DHUDurationExt extension

Utility to delay some callback (or code execution).
toClockString() String

Available on Duration, provided by the DHUDurationExt extension

Formats the duration as HH:mm:ss.
toHumanShort() String

Available on Duration, provided by the DHUDurationExt extension

Formats the duration as a short human-readable string (e.g., "1h 3m 4s").