ffs-cli 0.1.4

A fast and flexible server management CLI tool for cloud providers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::{SystemTime, UNIX_EPOCH};

/// Returns the current Unix timestamp in seconds.
///
/// # Panics
///
/// Panics if the system time is before the Unix epoch.
#[must_use]
pub fn timestamp() -> u64 {
    SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .unwrap()
        .as_secs()
}