macro_rules! profile_end {
($name:ident) => { ... };
}Expand description
The profile_end! macro logs the elapsed time of the profiling instance created by profile_start!.
These macros are useful for quick profiling without needing to manually create and manage TimeLapse instances.
ยงUsage
use std::time::Duration;
use timelapse::{TimeLapse, profile_start, profile_end};
profile_start!(my_profiler);
std::thread::sleep(Duration::from_millis(100));
assert!(my_profiler.elapsed().as_millis() >= 100);
profile_end!(my_profiler);