2019-10-14 09:08:39 -05:00
|
|
|
// ignore-windows: TODO clock shims are not implemented on Windows
|
2019-10-02 13:17:58 -05:00
|
|
|
// compile-flags: -Zmiri-disable-isolation
|
|
|
|
|
|
|
|
use std::time::SystemTime;
|
|
|
|
|
|
|
|
fn main() {
|
2020-03-06 07:28:34 -06:00
|
|
|
let now1 = SystemTime::now();
|
|
|
|
|
|
|
|
// Do some work to make time pass.
|
|
|
|
for _ in 0..10 { drop(vec![42]); }
|
|
|
|
|
|
|
|
let now2 = SystemTime::now();
|
|
|
|
assert!(now2 > now1);
|
2019-10-02 13:17:58 -05:00
|
|
|
}
|