SplitScript reference / Duration / wholeSeconds

Duration.wholeSeconds

Method

Duration.wholeSeconds() -> i64

Returns the normalized whole-second component.

For negative fractional durations this is the mathematical floor. For example, negative 1.25 seconds has a whole-second component of -2.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Inspect an exact duration

let seconds = Duration.fromSeconds(12.5).wholeSeconds()