From 14958bdd230a1bdca96350bfcb3f8413933a2261 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Sat, 31 Dec 2016 03:04:01 +0100 Subject: [PATCH] fix: Correct type for module interval --- include/modules/meta/timer_module.hpp | 2 +- src/modules/cpu.cpp | 2 +- src/modules/date.cpp | 2 +- src/modules/fs.cpp | 2 +- src/modules/github.cpp | 2 +- src/modules/memory.cpp | 2 +- src/modules/network.cpp | 2 +- src/modules/script.cpp | 2 +- src/modules/temperature.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/modules/meta/timer_module.hpp b/include/modules/meta/timer_module.hpp index 2a95a72d..1ba270a2 100644 --- a/include/modules/meta/timer_module.hpp +++ b/include/modules/meta/timer_module.hpp @@ -37,7 +37,7 @@ namespace modules { } protected: - interval_t m_interval{1}; + interval_t m_interval{1.0}; }; } diff --git a/src/modules/cpu.cpp b/src/modules/cpu.cpp index 8342997d..7780430c 100644 --- a/src/modules/cpu.cpp +++ b/src/modules/cpu.cpp @@ -16,7 +16,7 @@ namespace modules { template class module; cpu_module::cpu_module(const bar_settings& bar, string name_) : timer_module(bar, move(name_)) { - m_interval = m_conf.get(name(), "interval", 1s); + m_interval = m_conf.get(name(), "interval", 1s); m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_LOAD, TAG_RAMP_LOAD, TAG_RAMP_LOAD_PER_CORE}); diff --git a/src/modules/date.cpp b/src/modules/date.cpp index fa5a0ac9..e86de6be 100644 --- a/src/modules/date.cpp +++ b/src/modules/date.cpp @@ -22,7 +22,7 @@ namespace modules { throw module_error("No date or time format specified"); } - m_interval = m_conf.get(name(), "interval", 1s); + m_interval = m_conf.get(name(), "interval", 1s); m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_DATE}); diff --git a/src/modules/fs.cpp b/src/modules/fs.cpp index 90854ed4..84c3b597 100644 --- a/src/modules/fs.cpp +++ b/src/modules/fs.cpp @@ -26,7 +26,7 @@ namespace modules { m_remove_unmounted = m_conf.get(name(), "remove-unmounted", m_remove_unmounted); m_fixed = m_conf.get(name(), "fixed-values", m_fixed); m_spacing = m_conf.get(name(), "spacing", m_spacing); - m_interval = m_conf.get(name(), "interval", 30s); + m_interval = m_conf.get(name(), "interval", 30s); // Add formats and elements m_formatter->add( diff --git a/src/modules/github.cpp b/src/modules/github.cpp index 6bb7ba50..c6f37b93 100644 --- a/src/modules/github.cpp +++ b/src/modules/github.cpp @@ -14,7 +14,7 @@ namespace modules { github_module::github_module(const bar_settings& bar, string name_) : timer_module(bar, move(name_)), m_http(http_util::make_downloader()) { m_accesstoken = m_conf.get(name(), "token"); - m_interval = m_conf.get(name(), "interval", 60s); + m_interval = m_conf.get(name(), "interval", 60s); m_empty_notifications = m_conf.get(name(), "empty-notifications", m_empty_notifications); m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL}); diff --git a/src/modules/memory.cpp b/src/modules/memory.cpp index 7266b922..77e553ce 100644 --- a/src/modules/memory.cpp +++ b/src/modules/memory.cpp @@ -15,7 +15,7 @@ namespace modules { template class module; memory_module::memory_module(const bar_settings& bar, string name_) : timer_module(bar, move(name_)) { - m_interval = m_conf.get(name(), "interval", 1s); + m_interval = m_conf.get(name(), "interval", 1s); m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_USED, TAG_BAR_FREE}); diff --git a/src/modules/network.cpp b/src/modules/network.cpp index a7bdd94c..2fe85e98 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -19,7 +19,7 @@ namespace modules { m_ping_nth_update = m_conf.get(name(), "ping-interval", m_ping_nth_update); m_udspeed_minwidth = m_conf.get(name(), "udspeed-minwidth", m_udspeed_minwidth); m_accumulate = m_conf.get(name(), "accumulate-stats", m_accumulate); - m_interval = m_conf.get(name(), "interval", 1s); + m_interval = m_conf.get(name(), "interval", 1s); m_conf.warn_deprecated(name(), "udspeed-minwidth", "%downspeed:min:max% and %upspeed:min:max%"); diff --git a/src/modules/script.cpp b/src/modules/script.cpp index 90b6c9d6..39abc2c5 100644 --- a/src/modules/script.cpp +++ b/src/modules/script.cpp @@ -13,7 +13,7 @@ namespace modules { m_tail = m_conf.get(name(), "tail", m_tail); m_maxlen = m_conf.get(name(), "maxlen", m_maxlen); m_ellipsis = m_conf.get(name(), "ellipsis", m_ellipsis); - m_interval = m_conf.get(name(), "interval", m_tail ? 0s : 5s); + m_interval = m_conf.get(name(), "interval", m_tail ? 0s : 5s); m_conf.warn_deprecated( name(), "maxlen", "\"format =