thetime
Simple Rust library for time
- builds on top of std, chrono and time
- very simple and intuitive to use
- wraps some very useful functions that are usually buried deep in modules
Examples
use thetime::{System, Time};
println!("It has been {} seconds since 1 Jan 1970", System::now().unix());
Which traits you need
use thetime::{System, Ntp, Time};
use thetime::{System, Ntp, Time, TimeDiff};
use thetime::{System, Ntp, Time, StrTime};
use thetime::{System, Ntp, Time, IntTime}
Utilities provided
List
- NTP server pinging
- System time grabbing
- time diff functions
- string to time structs
- timestamps as integers to time structs
- strptime and strftime
- convienent
now method in the root for easy access