Improve: Master using ZSTD_DCtx and using new RTT

This commit is contained in:
yuanyuanxiang
2025-08-15 03:00:18 +08:00
parent e779fb0b51
commit 4a706d4f7b
8 changed files with 67 additions and 53 deletions

View File

@@ -795,6 +795,13 @@ typedef struct LOGIN_INFOR
}
}LOGIN_INFOR;
inline uint64_t GetUnixMs() {
auto system_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now()
);
return system_ms.time_since_epoch().count();
}
// <20>̶<EFBFBD>1024<32>ֽ<EFBFBD>
typedef struct Heartbeat
{
@@ -808,10 +815,7 @@ typedef struct Heartbeat
memset(this, 0, sizeof(Heartbeat));
}
Heartbeat(const std::string& s, int ping = 0) {
auto system_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now()
);
Time = system_ms.time_since_epoch().count();
Time = GetUnixMs();
strcpy_s(ActiveWnd, s.c_str());
Ping = ping;
memset(Reserved, 0, sizeof(Reserved));