runner 0.5.0

Utility for running Rust snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//: -s
// filetime.rs
use filetime::FileTime;

let metadata = fs::metadata("filetime.rs").unwrap();

let mtime = FileTime::from_last_modification_time(&metadata);
println!("{}", mtime);

let atime = FileTime::from_last_access_time(&metadata);
assert!(mtime < atime);

// Inspect values that can be interpreted across platforms
println!("{}", mtime.unix_seconds());
println!("{}", mtime.nanoseconds());

// Print the platform-specific value of seconds
println!("{}", mtime.seconds());