time_from_systemtime

Macro time_from_systemtime 

Source
macro_rules! time_from_systemtime {
    ($time:expr) => { ... };
}
Expand description

Converts a std::time::SystemTime into a time_t i64 value.

This macro will convert the provided SystemTime value into a signed 64-bit integer storing the number of seconds since 1970, saturating if the value is out of the range that a 64-bit integer can represent.

The returned i64 value can be used with EventBuilder::add_value and EventBuilder::add_value_sequence.

Note: time_from_systemtime is implemented as a macro because this crate is [no_std]. Implementing this via a function would require this crate to reference std::time::SystemTimeError.