diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-29 16:52:02 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-29 16:52:02 +0200 |
commit | 598bb93cc2e74d32997ed438be1a37b6d44de30e (patch) | |
tree | 22f83b78280b5b78a8d6d8bf873ec592bd6589e9 /src/StateFile.hxx | |
parent | dc531b64ae3a2df5a796a1e6f9b1de1b528be2a0 (diff) |
StateFile: migrate from TimeoutMonitor to TimerEvent
Diffstat (limited to 'src/StateFile.hxx')
-rw-r--r-- | src/StateFile.hxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/StateFile.hxx b/src/StateFile.hxx index 342a20c22..3eba7f620 100644 --- a/src/StateFile.hxx +++ b/src/StateFile.hxx @@ -20,7 +20,7 @@ #ifndef MPD_STATE_FILE_HXX #define MPD_STATE_FILE_HXX -#include "event/TimeoutMonitor.hxx" +#include "event/TimerEvent.hxx" #include "fs/AllocatedPath.hxx" #include "Compiler.h" @@ -31,11 +31,12 @@ struct Partition; class OutputStream; class BufferedOutputStream; -class StateFile final : private TimeoutMonitor { +class StateFile final { const AllocatedPath path; const std::string path_utf8; const std::chrono::steady_clock::duration interval; + TimerEvent timer_event; Partition &partition; @@ -76,8 +77,8 @@ private: gcc_pure bool IsModified() const noexcept; - /* virtual methods from TimeoutMonitor */ - void OnTimeout() override; + /* callback for #timer_event */ + void OnTimeout(); }; #endif /* STATE_FILE_H */ |