mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
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.
This commit is contained in:
9
include/util/prepare_for_sleep.h
Normal file
9
include/util/prepare_for_sleep.h
Normal file
@ -0,0 +1,9 @@
|
||||
#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
|
Reference in New Issue
Block a user