wsd: reuse RequestManager in SaveManager
Change-Id: Ic1842d126edeb8e8771998466aba79598e741a68 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
parent
3431a68709
commit
f24aec95e2
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue