pub fn timeval_from_duration(duration: Duration) -> timeval