X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FTimeout.h;h=d4b0a647fce4615eff084e9c878ba48b802fb02e;hb=d5f2bad461dc3fc783cbb1e1b205fa5c6543f8e7;hp=28b00333be1e09c09000cc2f3d668ed1674afa70;hpb=adaad6e2e53630263c64b42f75c170a463a106a1;p=lyx.git diff --git a/src/support/Timeout.h b/src/support/Timeout.h index 28b00333be..d4b0a647fc 100644 --- a/src/support/Timeout.h +++ b/src/support/Timeout.h @@ -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