macro_rules! debug_time {
    ($($body:tt)*) => { ... };
}
Expand description

Code inside the macro will only run if the current build is on debug mode. This will not run if on release.

Examples

use profile_time::debug_time;
 
debug_time! {
    // Code inside here will only be run in debug mode
    println!("Current mode: debug");
}