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.cxx | |
parent | dc531b64ae3a2df5a796a1e6f9b1de1b528be2a0 (diff) |
StateFile: migrate from TimeoutMonitor to TimerEvent
Diffstat (limited to 'src/StateFile.cxx')
-rw-r--r-- | src/StateFile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/StateFile.cxx b/src/StateFile.cxx index fc858b332..ba2be8d14 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -42,9 +42,9 @@ constexpr std::chrono::steady_clock::duration StateFile::DEFAULT_INTERVAL; StateFile::StateFile(AllocatedPath &&_path, std::chrono::steady_clock::duration _interval, Partition &_partition, EventLoop &_loop) - :TimeoutMonitor(_loop), - path(std::move(_path)), path_utf8(path.ToUTF8()), + :path(std::move(_path)), path_utf8(path.ToUTF8()), interval(_interval), + timer_event(_loop, BIND_THIS_METHOD(OnTimeout)), partition(_partition) { } @@ -137,8 +137,8 @@ try { void StateFile::CheckModified() { - if (!IsActive() && IsModified()) - Schedule(interval); + if (!timer_event.IsActive() && IsModified()) + timer_event.Schedule(interval); } void |