diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-12-19 19:35:36 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-04 03:33:18 -0500 |
| commit | 2d276cad0b46d68e6886645559cd47c0165392fe (patch) | |
| tree | 9489bd33ac339e688ea4e4a899bf33043a47adf4 /src/shared/util.h | |
| parent | a7051df5da4139661169f227861b712453e7b8b0 (diff) | |
put expensive logging in an optional function
Diffstat (limited to 'src/shared/util.h')
| -rw-r--r-- | src/shared/util.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index b6f898db..788d2444 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -52,6 +52,20 @@ void SetThisThreadName(const QString& s); } // namespace MOShared
+class TimeThis
+{
+public:
+ TimeThis(QString what={});
+ ~TimeThis();
+
+private:
+ using Clock = std::chrono::high_resolution_clock;
+
+ QString m_what;
+ Clock::time_point m_start;
+};
+
+
enum class Exit
{
None = 0x00,
|
