refactor: proper modules destruction

This commit is contained in:
Alexis
2018-12-26 11:13:36 +01:00
parent 8af813c2f1
commit 399f61df98
25 changed files with 284 additions and 216 deletions

View File

@ -8,7 +8,7 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
label_.get_style_context()->add_class(id);
}
thread_ = [this] {
auto now = waybar::chrono::clock::now();
auto now = std::chrono::system_clock::now();
dp.emit();
auto timeout = std::chrono::floor<std::chrono::seconds>(now + interval_);
auto time_s = std::chrono::time_point_cast<std::chrono::seconds>(timeout);