2016-08-31 20:54:38 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <thread>
|
|
|
|
#include "../Utilities/Timer.h"
|
2017-04-10 22:21:16 -04:00
|
|
|
#include "../Utilities/AutoResetEvent.h"
|
2016-08-31 20:54:38 -04:00
|
|
|
|
|
|
|
class AutoSaveManager
|
|
|
|
{
|
|
|
|
private:
|
2018-03-20 22:48:00 -04:00
|
|
|
const uint32_t _autoSaveSlot = 11;
|
2016-08-31 20:54:38 -04:00
|
|
|
std::thread _autoSaveThread;
|
2017-04-10 22:21:16 -04:00
|
|
|
|
2016-08-31 20:54:38 -04:00
|
|
|
atomic<bool> _stopThread;
|
2017-04-10 22:21:16 -04:00
|
|
|
AutoResetEvent _signal;
|
2016-08-31 20:54:38 -04:00
|
|
|
Timer _timer;
|
|
|
|
|
|
|
|
public:
|
|
|
|
AutoSaveManager();
|
|
|
|
~AutoSaveManager();
|
|
|
|
};
|