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); }; } } }