macro_toolset

Macro now

Source
macro_rules! now {
    () => { ... };
}
Expand description

Faster way to get current timestamp other than chrono::Local::now().timestamp(), 12x faster on my machine.

ยงExample

let now_ts_sec = now!().as_secs(); // Seconds since UNIX_EPOCH
let now_ts_millis = now!().as_millis(); // Milliseconds since UNIX_EPOCH

See Duration for more details.