feat(network): network info interval

This commit is contained in:
Alexis
2018-11-16 10:02:12 +01:00
parent c910767378
commit e42fae32ab
6 changed files with 30 additions and 11 deletions

View File

@ -47,7 +47,7 @@ void waybar::modules::Battery::worker()
// Trigger first values
update();
uint32_t interval = config_["interval"].isUInt() ? config_["interval"].asUInt() : 60;
threadTimer_ = [this, interval] {
thread_timer_ = [this, interval] {
thread_.sleep_for(chrono::seconds(interval));
dp.emit();
};
@ -58,7 +58,7 @@ void waybar::modules::Battery::worker()
return;
}
// TODO: don't stop timer for now since there is some bugs :?
// threadTimer_.stop();
// thread_timer_.stop();
dp.emit();
};
}