fs_set_times/system_time_spec.rs
1use std::time::SystemTime;
2
3/// A value for specifying a time.
4#[derive(Debug)]
5pub enum SystemTimeSpec {
6 /// A value which always represents the current time, in symbolic form, so
7 /// that even as time elapses, it continues to represent the current time.
8 SymbolicNow,
9
10 /// An absolute time value.
11 Absolute(SystemTime),
12}
13
14impl From<SystemTime> for SystemTimeSpec {
15 fn from(time: SystemTime) -> Self {
16 Self::Absolute(time)
17 }
18}