infinipaint/include/Helpers/NetworkingObjects/DelayUpdateSerializedClassManager.cpp
2025-12-10 17:23:05 +03:00

13 lines
466 B
C++

#include "DelayUpdateSerializedClassManager.hpp"
namespace NetworkingObjects {
void DelayUpdateSerializedClassManager::update() {
std::erase_if(updatingObjs, [](auto& updatingPair) {
if((std::chrono::steady_clock::now() - updatingPair.second.lastUpdateTimePoint) >= std::chrono::seconds(3)) {
updatingPair.second.setDataAfterTimeout();
return true;
}
return false;
});
}
}