/// Creates a new empty file with creation time after (not equal) the given time.
///
/// This function is used to create multiple files differing by creation time.
/// It adapts to the operating system timer resolution.
///
/// Returns the creation time of the newly created file.
/// Panics if `time` is in future or if file could not be created.
Creates a new empty file with creation time after (not equal) the given time.
This function is used to create multiple files differing by creation time.
It adapts to the operating system timer resolution.

Returns the creation time of the newly created file.
Panics if `time` is in future or if file could not be created.
Creates a new empty file with creation time after ( not equal ) the given time . This function is used to create multiple files differing by creation time . It adapts to the operating system timer resolution . Returns the creation time of the newly created file . Panics if ` time ` is in future or if file could not be created .
pub fn create_file_newer_than(f: &PathBuf, time: SystemTime) -> SystemTime {
        assert!(SystemTime::now() >= time);
        let mut delay = std::time::Duration::from_millis(1);
        loop {
            thread::sleep(delay);
            create_file(&f);
            let ctime = fs::metadata(&f).unwrap().modified().unwrap();
            if ctime != time {
                return ctime;
            }
            delay *= 2;
        }
    }
pub fn create_file_newer_than ( f : & PathBuf , time : SystemTime ) -> SystemTime { assert ! ( SystemTime now ( ) time ) ; let mut delay = std :: time :: Duration :: from_millis ( 1 ) ; loop { thread :: sleep ( delay ) ; create_file ( & f ) ; let ctime = fs :: metadata ( & f ) . unwrap ( ) . modified ( ) . unwrap ( ) ; if ctime != time { return ctime ; } delay *= 2 ; } }
Creates a new empty file with creation time after (not equal) the given time.
Creates a new empty file with creation time after ( not equal ) the given time .
f
&PathBuf
time
SystemTime