waybar/include/util/prepare_for_sleep.h
Patrick Nicolas 3c9cbc99d7 Wake all sleeping threads when leaving suspend
std::condition_variable::wait_for does not count time spent in sleep
mode, resulting in longer than expected waits.
2023-06-07 10:17:42 +02:00

10 lines
218 B
C++

#pragma once
#include "SafeSignal.hpp"
namespace waybar::util {
// Get a signal emited with value true when entering sleep, and false when exiting
SafeSignal<bool>& prepare_for_sleep();
} // namespace waybar::util