Skip to content

Commit

Permalink
Fix use of start only in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Dec 12, 2022
1 parent dbd39cf commit 34529be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions serial_test/src/code_lock.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use crate::rwlock::{Locks, MutexGuardWrapper};
use dashmap::{try_result::TryResult, DashMap};
use lazy_static::lazy_static;
#[cfg(all(feature = "logging"))]
#[cfg(feature = "logging")]
use log::debug;
use std::{
sync::{atomic::AtomicU32, Arc},
time::Instant,
};
use std::sync::{atomic::AtomicU32, Arc};
#[cfg(feature = "logging")]
use std::time::Instant;

pub(crate) struct UniqueReentrantMutex {
locks: Locks,
Expand Down Expand Up @@ -56,9 +55,10 @@ impl Default for UniqueReentrantMutex {
}

pub(crate) fn check_new_key(name: &str) {
#[cfg(feature = "logging")]
let start = Instant::now();
loop {
#[cfg(all(feature = "logging"))]
#[cfg(feature = "logging")]
{
let duration = start.elapsed();
debug!("Waiting for '{}' {:?}", name, duration);
Expand Down

0 comments on commit 34529be

Please sign in to comment.