mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Reducing CPU usage for server
This commit is contained in:
parent
e4e17ca4b9
commit
a815d013fe
@ -9,6 +9,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <Script/Script.hpp>
|
#include <Script/Script.hpp>
|
||||||
#include <Script/API/TimerAPI.hpp>
|
#include <Script/API/TimerAPI.hpp>
|
||||||
|
#include <chrono>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include "Networking.hpp"
|
#include "Networking.hpp"
|
||||||
|
|
||||||
@ -392,6 +394,7 @@ int Networking::MainLoop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TimerAPI::Tick();
|
TimerAPI::Tick();
|
||||||
|
this_thread::sleep_for(chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
TimerAPI::Terminate();
|
TimerAPI::Terminate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user