mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-20 07:00:30 +00:00
add real uptime counter, for use in lua later
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
/// Created by Anonymous275 on 7/28/2020
|
||||
///
|
||||
#pragma once
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
extern std::string ServerName;
|
||||
extern std::string ServerDesc;
|
||||
@@ -25,4 +26,9 @@ extern bool Private;
|
||||
extern int MaxCars;
|
||||
extern bool Debug;
|
||||
extern int Port;
|
||||
extern int PPS;
|
||||
extern int PPS;
|
||||
|
||||
extern std::chrono::time_point<std::chrono::high_resolution_clock> StartTime;
|
||||
inline std::chrono::seconds GetUptimeInSeconds() {
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(std::chrono::high_resolution_clock::now() - StartTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user