Begin Rust track : hello-world, gigasecond

This commit is contained in:
2023-07-01 15:43:37 -05:00
parent 4b5964861e
commit 532545e592
17 changed files with 579 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
use std::time::SystemTime;
use time::PrimitiveDateTime as DateTime;
const GIGASECOND_IN_SECONDS: i64 = 1_000_000_000;
// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
start + time::Duration::seconds(GIGASECOND_IN_SECONDS)
}