External Publication
Visit Post

`Instant::PAST_VALUE` constant?

Rust Internals [Unofficial] May 14, 2026
Source

Storing the program startup time still isn't const, and makes this logic wrong for the first second after startup:

JarredAllen:

        if self.last_bar_timestamp.elapsed() >= Duration::from_secs(1) { self.do_bar(); }

Granted that logic is still iffy for Instant::MIN on devices which zero their timers to boot up (but that's probably fine).

Discussion in the ATmosphere

Loading comments...