diff options
author | Max Kellermann <max@musicpd.org> | 2016-12-27 23:06:34 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-12-28 01:15:08 +0100 |
commit | b042095ac239be78a704293f217328b7f1b4cc16 (patch) | |
tree | fcf5cc24aa212066562cef91dc24df2c89fd402f /src/StateFile.cxx | |
parent | 3413d1bf23a7ba4f33d015d1ec5024c191fe08e5 (diff) |
event/Loop: use std::chrono
Diffstat (limited to 'src/StateFile.cxx')
-rw-r--r-- | src/StateFile.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/StateFile.cxx b/src/StateFile.cxx index ab1cbdb39..20ce04a7d 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -37,7 +37,10 @@ static constexpr Domain state_file_domain("state_file"); -StateFile::StateFile(AllocatedPath &&_path, unsigned _interval, +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()), @@ -135,7 +138,7 @@ void StateFile::CheckModified() { if (!IsActive() && IsModified()) - ScheduleSeconds(interval); + Schedule(interval); } void |