MAke server respond to WS events even if running behind
This commit is contained in:
parent
a7d8fd1845
commit
52766c3715
@ -32,12 +32,11 @@ void sv::Server::Run()
|
|||||||
bool exit = false;
|
bool exit = false;
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
PollWSEvents();
|
|
||||||
|
|
||||||
auto t_now = std::chrono::steady_clock::now();
|
auto t_now = std::chrono::steady_clock::now();
|
||||||
while (t_now > t_next && !exit_)
|
while (t_now > t_next && !exit_)
|
||||||
{
|
{
|
||||||
time_ += 40;
|
time_ += 40;
|
||||||
|
PollWSEvents();
|
||||||
Update();
|
Update();
|
||||||
// std::cout << "Time: " << time_ << " ms, Clients: " << clients_.size() << std::endl;
|
// std::cout << "Time: " << time_ << " ms, Clients: " << clients_.size() << std::endl;
|
||||||
t_next += 40ms;
|
t_next += 40ms;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user