📜  执行持续时间 - Rust 代码示例

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

代码示例1
use std::time::Instant;
let start = Instant:now();
f();
let duration = start.elapsed();