Skip to main content

timer_seconds

Function timer_seconds 

Source
pub fn timer_seconds(mode: TimerMode, instant: i64, now: i64) -> u64
Expand description

Whole seconds to display.

A countdown rounds up, so it shows 1 until the instant it completes; elapsed time rounds down. Both clamp at zero. The math uses absolute epoch milliseconds, so time zones and daylight-saving transitions cannot change the result.