mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
The event loop tries to run no faster than every 10ms. If it detects that it goes faster, it would incorrectly calculate the difference, and then wait (what I assume was) way too long or too short. Either way, now it's fixed and it correctly works, even when introducing new lua states.
21 lines
432 B
C++
21 lines
432 B
C++
#pragma once
|
|
|
|
#include "Common.h"
|
|
#include "IThreaded.h"
|
|
#include "TResourceManager.h"
|
|
#include "TServer.h"
|
|
|
|
class THeartbeatThread : public IThreaded {
|
|
public:
|
|
THeartbeatThread(TResourceManager& ResourceManager, TServer& Server);
|
|
//~THeartbeatThread();
|
|
void operator()() override;
|
|
|
|
private:
|
|
std::string GenerateCall();
|
|
std::string GetPlayers();
|
|
|
|
TResourceManager& mResourceManager;
|
|
TServer& mServer;
|
|
};
|