add server mspt (+procotol format)
This commit is contained in:
@@ -12,6 +12,7 @@ private:
|
||||
std::uint8_t m_ConnectionID;
|
||||
std::string m_DisconnectReason;
|
||||
float m_ServerTPS;
|
||||
float m_ServerMSPT;
|
||||
int m_Ping = 0;
|
||||
public:
|
||||
ClientConnexion();
|
||||
@@ -25,6 +26,7 @@ public:
|
||||
|
||||
const std::string& GetDisconnectReason() const { return m_DisconnectReason; }
|
||||
float GetServerTPS() const { return m_ServerTPS; }
|
||||
float GetServerMSPT() const { return m_ServerMSPT; }
|
||||
int GetServerPing() const { return m_Ping; }
|
||||
|
||||
REMOVE_COPY(ClientConnexion);
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef std::map<std::uint8_t, ServerConnexion> ConnexionMap;
|
||||
class TickCounter {
|
||||
private:
|
||||
float m_TPS;
|
||||
float m_MSPT;
|
||||
std::uint64_t m_LastTPSTime;
|
||||
std::uint8_t m_TickCount;
|
||||
public:
|
||||
@@ -46,6 +47,9 @@ public:
|
||||
}
|
||||
|
||||
float GetTPS() const { return m_TPS; }
|
||||
float GetMSPT() const { return m_MSPT; }
|
||||
|
||||
void SetMSPT(float mspt) { m_MSPT = mspt; }
|
||||
};
|
||||
|
||||
class Server {
|
||||
|
||||
Reference in New Issue
Block a user