mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-02-01 12:33:10 +00:00
14 lines
270 B
Rust
14 lines
270 B
Rust
|
|
#[macro_export]
|
||
|
|
macro_rules! timed {
|
||
|
|
($a:expr, $msg:expr) => {{
|
||
|
|
use std::time::Instant;
|
||
|
|
|
||
|
|
use log::info;
|
||
|
|
|
||
|
|
let timer = Instant::now();
|
||
|
|
let res = $a;
|
||
|
|
info!("{:.3}s {}", timer.elapsed().as_secs_f32(), $msg);
|
||
|
|
res
|
||
|
|
}};
|
||
|
|
}
|