[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 4 09:17:49 UTC 2018
wsd/DocumentBroker.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 10c302f04781b1607f6500ba56c35195aca03ce0
Author: Tor Lillqvist <tml at iki.fi>
AuthorDate: Tue Sep 4 11:55:31 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Sep 4 12:12:35 2018 +0300
Make std::chrono usage more portable
Add a std::chrono::time_point_cast to get it to compile against libc++
(for iOS).
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 8de6a9779..48671a0dc 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1785,9 +1785,9 @@ void DocumentBroker::dumpState(std::ostream& os)
os << "\n doc key: " << _docKey;
os << "\n doc id: " << _docId;
os << "\n num sessions: " << _sessions.size();
- const std::time_t t = std::chrono::system_clock::to_time_t(
+ const std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::time_point_cast<std::chrono::seconds>(
std::chrono::system_clock::now()
- + (_lastSaveTime - std::chrono::steady_clock::now()));
+ + (_lastSaveTime - std::chrono::steady_clock::now())));
os << "\n last saved: " << std::ctime(&t);
os << "\n cursor " << _cursorPosX << ", " << _cursorPosY
<< "( " << _cursorWidth << "," << _cursorHeight << ")\n";
More information about the Libreoffice-commits
mailing list