18 lines
346 B
C++
18 lines
346 B
C++
#pragma once
|
|
#include <string>
|
|
#include <chrono>
|
|
#include <filesystem>
|
|
|
|
class HotReload {
|
|
public:
|
|
HotReload(const std::string& filename);
|
|
|
|
bool CheckForChanges();
|
|
void UpdateLastWriteTime();
|
|
|
|
private:
|
|
std::string scriptFile;
|
|
std::time_t lastWriteTime;
|
|
|
|
std::time_t GetFileWriteTime(const std::string& filename);
|
|
}; |