From 422cabd52ef78092da755fe6ab0a9802d4a41151 Mon Sep 17 00:00:00 2001 From: Michel Ferrero Date: Tue, 3 Jun 2014 17:07:44 +0200 Subject: [PATCH] Fix detail in callbacks --- triqs/utility/callbacks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triqs/utility/callbacks.cpp b/triqs/utility/callbacks.cpp index 96a33655..e30ffb1e 100644 --- a/triqs/utility/callbacks.cpp +++ b/triqs/utility/callbacks.cpp @@ -28,10 +28,10 @@ namespace utility { std::function clock_callback(int time_in_seconds) { signal_handler::start(); if (time_in_seconds <= 0) - return []() { return (!triqs::signal_handler::received()); }; + return []() { return (triqs::signal_handler::received()); }; auto end_time = std::chrono::system_clock::now() + std::chrono::seconds(time_in_seconds); - return [end_time]() { return (!triqs::signal_handler::received()) || (std::chrono::system_clock::now() > end_time); }; + return [end_time]() { return (triqs::signal_handler::received()) || (std::chrono::system_clock::now() > end_time); }; } } }