コンテンツにスキップ

Duration

このコンテンツはまだ日本語訳がありません。

Defined in: epoch.rs:746

pub struct Duration

Scale-invariant duration measured in SI (TAI) seconds.

Does not carry a scale tag because SI seconds tick uniformly regardless of the reference time scale. UTC display arithmetic (e.g. “翌日同時刻”) is NOT provided — use Epoch::<Utc>::add_si_seconds which correctly handles leap second boundaries.

const fn from_si_seconds(s: f64) -> Self

Construct from SI seconds.


const fn from_minutes(m: f64) -> Self

Construct from minutes (= 60 SI seconds).


const fn from_hours(h: f64) -> Self

Construct from hours (= 3600 SI seconds).


fn as_si_seconds(&self) -> f64

Return the duration in SI seconds.