diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp index 56f6e2cf3..d749a49d4 100644 --- a/wsd/DocumentBroker.hpp +++ b/wsd/DocumentBroker.hpp @@ -712,14 +712,13 @@ private: bool hasSavingTimedOut(std::chrono::milliseconds timeoutMs = std::chrono::milliseconds(COMMAND_TIMEOUT_MS)) const { - return isSaving() && timeSinceLastSaveRequest() >= timeoutMs; + return _request.hasLastRequestTimedOut(timeoutMs); } /// The duration elapsed since we sent the last save request to Core. std::chrono::milliseconds timeSinceLastSaveRequest() const { - return std::chrono::duration_cast( - RequestManager::now() - _request.lastRequestTime()); + return _request.timeSinceLastRequest(); } private: