Function secs
Source pub const fn secs(seconds: u64) -> Duration
Expand description
Creates a Duration from whole seconds.
This is Duration::from_secs as a const fn, which keeps motion declarations short.
ยงExamples
use std::time::Duration;
use gpui::secs;
assert_eq!(secs(2), Duration::from_secs(2));