add real uptime counter, for use in lua later

This commit is contained in:
Lion Kortlepel
2021-02-03 00:24:49 +01:00
committed by Lion
parent e4979bb6e2
commit f9cb9af078
3 changed files with 10 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ bool Private;
int MaxCars;
bool Debug;
int Port;
std::chrono::time_point<std::chrono::high_resolution_clock> StartTime;
void SetValues(const std::string& Line, int Index) {
int state = 0;

View File

@@ -1,5 +1,6 @@
#include "CustomAssert.h"
#include "Settings.h"
#include "Startup.h"
#include <iostream>
#include <thread>
@@ -36,6 +37,7 @@ int main(int argc, char* argv[]) {
std::thread t1(loop);
t1.detach();
#endif
StartTime = std::chrono::high_resolution_clock::now();
ConsoleInit();
InitServer(argc, argv);
InitConfig();