From a7194295c8e0b92a607457986ed4bfa81c23703b Mon Sep 17 00:00:00 2001 From: gabime Date: Wed, 29 Jan 2014 04:08:58 +0200 Subject: [PATCH] fix queue --- include/c11log/details/blocking_queue.h | 3 +-- include/utils.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/c11log/details/blocking_queue.h b/include/c11log/details/blocking_queue.h index 61db9ba0..2db2df85 100644 --- a/include/c11log/details/blocking_queue.h +++ b/include/c11log/details/blocking_queue.h @@ -104,8 +104,7 @@ private: std::mutex mutex_; std::condition_variable item_pushed_cond_; std::condition_variable item_popped_cond_; - static constexpr auto one_hour = std::chrono::seconds(3); - + static constexpr auto one_hour = std::chrono::hours(1); }; } diff --git a/include/utils.h b/include/utils.h index c5210157..181dbc8f 100644 --- a/include/utils.h +++ b/include/utils.h @@ -35,7 +35,6 @@ inline void bench(const std::string& fn_name, const std::chrono::milliseconds &d auto now = the_clock::now(); if (now - start_time >= duration) break; - auto p = now - lastPrintTime; if (now - lastPrintTime >= print_interval) { std::cout << fn_name << ": " << format(counter) << " per sec" << std::endl; @@ -55,4 +54,4 @@ inline void bench(const std::string& fn_name, const std::function& fn) std::cout << fn_name << ": " << duration_cast(delta).count() << " ms" << std::endl; } -} \ No newline at end of file +}