mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 15:55:30 +00:00
add seconds since last ping print
This commit is contained in:
parent
32038046d5
commit
84252e892e
@ -75,7 +75,9 @@ void TClient::UpdatePingTime() {
|
||||
mLastPingTime = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
int TClient::SecondsSinceLastPing() {
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(
|
||||
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::high_resolution_clock::now() - mLastPingTime)
|
||||
.count();
|
||||
.count();
|
||||
debug("ping time for " + GetName() + ": " + std::to_string(seconds));
|
||||
return seconds;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user