mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 01:24:07 +00:00
24 lines
462 B
C++
24 lines
462 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <mutex>
|
|
|
|
#include "util/Timer.h"
|
|
|
|
class SaveManager {
|
|
public:
|
|
SaveManager() : m_uiAutosaveTimer{}, m_saveNotificationDepth(0) {}
|
|
|
|
void setAutosaveTimerTime(int settingValue);
|
|
bool autosaveDue() const;
|
|
int64_t secondsToAutosave() const;
|
|
|
|
void lock();
|
|
void unlock();
|
|
|
|
private:
|
|
time_util::time_point m_uiAutosaveTimer;
|
|
std::mutex m_saveNotificationMutex;
|
|
int m_saveNotificationDepth;
|
|
};
|