]> git.lyx.org Git - lyx.git/blobdiff - src/support/Timeout.h
Mingw-w64 build fixes for long long
[lyx.git] / src / support / Timeout.h
index 28b00333be1e09c09000cc2f3d668ed1674afa70..d4b0a647fce4615eff084e9c878ba48b802fb02e 100644 (file)
@@ -64,6 +64,30 @@ private:
        unsigned int timeout_ms;
 };
 
+// Small Timer class useful for debugging and performance investigation.
+class Timer
+{
+public:
+       ///
+       Timer();
+       ///
+       ~Timer();
+       ///
+       void restart();
+       ///
+       int elapsed() const;
+       ///
+       std::string dateStr(char separator = 0) const;
+       ///
+       std::string timeStr(char separator = 0) const;
+       ///
+       std::string toStr() const;
+       ///
+       static std::string currentToStr();
+private:
+       struct Private;
+       Private * d;
+};
 
 } // namespace lyx