From 3ed5d9f0d24415cfd7dbce3157af1ad58bd5f908 Mon Sep 17 00:00:00 2001 From: jonch <9093549+jon-chuang@users.noreply.github.com> Date: Fri, 11 Sep 2020 08:02:21 +0800 Subject: [PATCH] additive features --- algebra-core/src/timing.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/algebra-core/src/timing.rs b/algebra-core/src/timing.rs index 3ddc9058d..0499abbc0 100644 --- a/algebra-core/src/timing.rs +++ b/algebra-core/src/timing.rs @@ -84,14 +84,6 @@ macro_rules! timer_println { }; if !blacklisted && whitelisted_parents { - if cfg!(feature = "timing") { - let std_info = format!("[{:^28}] {} us", $string, elapsed); - #[cfg(feature = "timing_thread_id")] - let std_info = - format!("{:25} {}", format!("(tid: {})", thread_id::get()), std_info); - println!("{}", std_info); - } - if cfg!(feature = "timing_detailed") { let std_info = format!( "{:30} {:26} [{:^28}] {} us", @@ -109,7 +101,15 @@ macro_rules! timer_println { let std_info = format!("{:25} {}", format!("(tid: {})", thread_id::get()), std_info); println!("{}", std_info); + } else if cfg!(feature = "timing") { + let std_info = format!("[{:^28}] {} us", $string, elapsed); + #[cfg(feature = "timing_thread_id")] + let std_info = + format!("{:25} {}", format!("(tid: {})", thread_id::get()), std_info); + println!("{}", std_info); } + + } } }