lychee 0.24.2

A fast, async link checker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::time::SystemTime;

pub(crate) type Timestamp = u64;

/// Get the current UNIX timestamp
///
/// # Panics
///
/// Panics when the system clock is incorrectly configured
pub(crate) fn timestamp() -> Timestamp {
    SystemTime::now()
        .duration_since(SystemTime::UNIX_EPOCH)
        .expect("SystemTime before UNIX EPOCH!")
        .as_secs()
}