summaryrefslogtreecommitdiffstats
path: root/wsd/AdminModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wsd/AdminModel.cpp')
-rw-r--r--wsd/AdminModel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index df15297243..e0074ce5f7 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -11,6 +11,7 @@
#include "AdminModel.hpp"
+#include <chrono>
#include <memory>
#include <set>
#include <sstream>
@@ -733,4 +734,11 @@ void AdminModel::updateMemoryDirty(const std::string& docKey, int dirty)
}
}
+double AdminModel::getServerUptime()
+{
+ auto currentTime = std::chrono::system_clock::now();
+ std::chrono::duration<double> uptime = currentTime - LOOLWSD::StartTime;
+ return uptime.count();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */