summaryrefslogtreecommitdiff
path: root/src/StateFile.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-12-27 23:06:34 +0100
committerMax Kellermann <max@musicpd.org>2016-12-28 01:15:08 +0100
commitb042095ac239be78a704293f217328b7f1b4cc16 (patch)
treefcf5cc24aa212066562cef91dc24df2c89fd402f /src/StateFile.hxx
parent3413d1bf23a7ba4f33d015d1ec5024c191fe08e5 (diff)
event/Loop: use std::chrono
Diffstat (limited to 'src/StateFile.hxx')
-rw-r--r--src/StateFile.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/StateFile.hxx b/src/StateFile.hxx
index 8c59db6ef..733713e2e 100644
--- a/src/StateFile.hxx
+++ b/src/StateFile.hxx
@@ -25,6 +25,7 @@
#include "Compiler.h"
#include <string>
+#include <chrono>
struct Partition;
class OutputStream;
@@ -34,7 +35,7 @@ class StateFile final : private TimeoutMonitor {
const AllocatedPath path;
const std::string path_utf8;
- const unsigned interval;
+ const std::chrono::steady_clock::duration interval;
Partition &partition;
@@ -46,9 +47,9 @@ class StateFile final : private TimeoutMonitor {
prev_playlist_version = 0;
public:
- static constexpr unsigned DEFAULT_INTERVAL = 2 * 60;
+ static constexpr std::chrono::steady_clock::duration DEFAULT_INTERVAL = std::chrono::minutes(2);
- StateFile(AllocatedPath &&path, unsigned interval,
+ StateFile(AllocatedPath &&path, std::chrono::steady_clock::duration interval,
Partition &partition, EventLoop &loop);
void Read();