📜  rust sleep - Rust 代码示例

📅  最后修改于: 2022-03-11 14:49:24.796000             🧑  作者: Mango

代码示例2
use std::{thread, time};

loop {
    let ten_millis = time::Duration::from_millis(10);
    let now = time::Instant::now();
    thread::sleep(ten_millis);
}