serialize_duration

Function serialize_duration 

Source
pub fn serialize_duration<S>(d: &Duration, s: S) -> Result<S::Ok, S::Error>
where S: Serializer,
Expand description

A serde serializer function for chrono::Duration

that writes the duration as an f64 number of seconds followed by the s suffix.