sdf_common/lib.rs
1/// Render filters
2pub mod render;
3
4pub mod constants;
5
6pub mod display;
7
8#[cfg(feature = "version")]
9pub mod version;
10
11pub const LATEST_STABLE_DATAFLOW: &str = constants::DATAFLOW_STABLE_VERSION;
12
13/// Returns the current Unix time in seconds.
14/// Returns `None` if the system time is before the Unix epoch.
15pub fn current_unix_time_secs() -> Option<u64> {
16 Some(
17 std::time::SystemTime::now()
18 .duration_since(std::time::UNIX_EPOCH)
19 .ok()?
20 .as_secs(),
21 )
22}