StateFile: schedule timer only after a change
Save the state file 2 minutes after the last change. This reduces the disruptions by an idle MPD, and MPD can be paged out permanently until it is used.
This commit is contained in:
@@ -48,6 +48,11 @@ public:
|
||||
void Read();
|
||||
void Write();
|
||||
|
||||
/**
|
||||
* Schedules a write if MPD's state was modified.
|
||||
*/
|
||||
void CheckModified();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Save the current state versions for use with IsModified().
|
||||
@@ -61,8 +66,6 @@ private:
|
||||
gcc_pure
|
||||
bool IsModified() const;
|
||||
|
||||
void AutoWrite();
|
||||
|
||||
/* virtual methods from TimeoutMonitor */
|
||||
virtual bool OnTimeout() override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user