Options: convert status_message_time to std::chrono::steady_clock::duration
authorMax Kellermann <max@musicpd.org>
Wed, 26 Sep 2018 23:40:13 +0000 (01:40 +0200)
committerMax Kellermann <max@musicpd.org>
Wed, 26 Sep 2018 23:40:13 +0000 (01:40 +0200)
src/Options.hxx
src/StatusBar.cxx

index 4be7c98..b1e358d 100644 (file)
@@ -71,7 +71,7 @@ struct Options {
        bool audible_bell = true;
        bool visible_bell;
        bool bell_on_wrap = true;
-       std::chrono::seconds status_message_time = std::chrono::seconds(3);
+       std::chrono::steady_clock::duration status_message_time = std::chrono::seconds(3);
 #ifndef NCMPC_MINI
        bool enable_xterm_title;
 #endif
index fc2250e..08b9d3c 100644 (file)
@@ -262,7 +262,7 @@ StatusBar::SetMessage(const char *msg) noexcept
        doupdate();
 
        boost::system::error_code error;
-       message_timer.expires_from_now(std::chrono::seconds(options.status_message_time),
+       message_timer.expires_from_now(options.status_message_time,
                                       error);
        message_timer.async_wait(std::bind(&StatusBar::OnMessageTimer, this,
                                           std::placeholders::_1));