16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 09:19:18 +02:00

loading time fix

This commit is contained in:
maj00r
2026-05-19 19:04:46 +02:00
parent df5a8a897f
commit 2dfee2a322
11 changed files with 1722 additions and 157 deletions

View File

@@ -201,6 +201,22 @@ bool FileExists(std::string const &Filename);
std::pair<std::string, std::string> FileExists(std::vector<std::string> const &Names, std::vector<std::string> const &Extensions);
class FileExistsCacheScope
{
public:
FileExistsCacheScope();
~FileExistsCacheScope();
FileExistsCacheScope(FileExistsCacheScope const &) = delete;
FileExistsCacheScope &operator=(FileExistsCacheScope const &) = delete;
void clear();
void end();
private:
bool m_active { true };
};
// returns time of last modification for specified file
std::time_t last_modified(std::string const &Filename);