From 42af040fbd0cd2b9942f02ace3462ee8ac41d3ac Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@duempel.org> Date: Sun, 24 Aug 2014 12:59:45 +0200 Subject: StateFile: configurable interval --- src/StateFile.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/StateFile.cxx') diff --git a/src/StateFile.cxx b/src/StateFile.cxx index e0f0cedb1..7e9e35cc3 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -36,10 +36,11 @@ static constexpr Domain state_file_domain("state_file"); -StateFile::StateFile(AllocatedPath &&_path, +StateFile::StateFile(AllocatedPath &&_path, unsigned _interval, Partition &_partition, EventLoop &_loop) :TimeoutMonitor(_loop), path(std::move(_path)), path_utf8(path.ToUTF8()), + interval(_interval), partition(_partition), prev_volume_version(0), prev_output_version(0), prev_playlist_version(0) @@ -137,7 +138,7 @@ void StateFile::CheckModified() { if (!IsActive() && IsModified()) - ScheduleSeconds(2 * 60); + ScheduleSeconds(interval); } void -- cgit v1.2.3