summaryrefslogtreecommitdiff
path: root/rust/gigasecond/src/lib.rs
blob: bba8386bcd7bf46a3ff270ae6e015b39ed72f5c1 (plain)
1
2
3
4
5
6
7
use time::PrimitiveDateTime as DateTime;
use time::Duration;

// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
    start + Duration::seconds(1e9 as i64)
}