wsd: reuse RequestManager in SaveManager

Change-Id: Ic1842d126edeb8e8771998466aba79598e741a68
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2021-02-21 10:31:59 -05:00 committed by Ashod Nakashian
parent 3431a68709
commit f24aec95e2

View file

@ -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<std::chrono::milliseconds>(
RequestManager::now() - _request.lastRequestTime());
return _request.timeSinceLastRequest();
}
private: