add name to debug print, update ping time each packet

This commit is contained in:
Lion Kortlepel
2021-03-30 15:57:16 +02:00
parent b524aa67de
commit 667bd7f7c8
3 changed files with 3 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ TClient::TClient(TServer& Server)
void TClient::UpdatePingTime() {
mLastPingTime = std::chrono::high_resolution_clock::now();
debug(std::string("ping time updated!: ") + ((SecondsSinceLastPing() == 0) ? "OK" : "ERR"));
debug(GetName() + ": " + std::string("ping time updated!: ") + ((SecondsSinceLastPing() == 0) ? "OK" : "ERR"));
}
int TClient::SecondsSinceLastPing() {
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(