mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 19:04:00 +02:00
- thread safe localtime and hopefully back to good performance
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <utility>
|
||||
#include <SDL.h>
|
||||
#include <map>
|
||||
#include <chrono>
|
||||
#include "leak_dumper.h"
|
||||
|
||||
#if (defined WIN32) && !(defined snprintf)
|
||||
@@ -90,6 +91,12 @@ public:
|
||||
virtual void ShellCommandOutput_CallbackEvent(string cmd,char *output,void *userdata) = 0;
|
||||
};
|
||||
|
||||
typedef std::chrono::time_point<std::chrono::system_clock> system_time_point;
|
||||
tm threadsafe_localtime(const time_t &time);
|
||||
// extracting std::time_t from std:chrono for "now"
|
||||
time_t systemtime_now();
|
||||
|
||||
|
||||
// =====================================================
|
||||
// class PerformanceTimer
|
||||
// =====================================================
|
||||
|
Reference in New Issue
Block a user