mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor(modules): prefer sigc::mem_fun
This commit is contained in:
@ -6,9 +6,7 @@ waybar::modules::Cpu::Cpu(Json::Value config)
|
||||
_label.get_style_context()->add_class("cpu");
|
||||
int interval = _config["interval"] ? _config["inveral"].asInt() : 10;
|
||||
_thread = [this, interval] {
|
||||
Glib::signal_idle().connect_once([this] {
|
||||
update();
|
||||
});
|
||||
Glib::signal_idle().connect_once(sigc::mem_fun(*this, &Cpu::update));
|
||||
_thread.sleep_for(chrono::seconds(interval));
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user