diff options
author | melkov <melkov@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
commit | 438546c8737d5c1fdeb31157dcf999717d930eec (patch) | |
tree | d29d229abd2f9f889b9b7eb148d635059dc26acf /util/datetime/cputimer.h | |
parent | 96647fad5355ff5ef45a00a6d85c097028584ab0 (diff) | |
download | ydb-438546c8737d5c1fdeb31157dcf999717d930eec.tar.gz |
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/cputimer.h')
-rw-r--r-- | util/datetime/cputimer.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/datetime/cputimer.h b/util/datetime/cputimer.h index 7d38d5bdb3..c6559c8de2 100644 --- a/util/datetime/cputimer.h +++ b/util/datetime/cputimer.h @@ -34,25 +34,25 @@ public: class TProfileTimer { TDuration T; -public: +public: TProfileTimer() { - Reset(); - } + Reset(); + } TDuration Get() const { return TRusage::Get().Utime - T; - } + } TDuration Step() { TRusage r; r.Fill(); TDuration d = r.Utime - T; T = r.Utime; - return d; - } + return d; + } void Reset() { T = TRusage::Get().Utime; - } -}; - + } +}; + /// Return cached processor cycle count per second. Method takes 1 second at first invocation. /// Note, on older systems cycle rate may change during program lifetime, /// so returned value may be incorrect. Modern Intel and AMD processors keep constant TSC rate. @@ -115,7 +115,7 @@ private: time_t Begin; ui64 BeginCycles; -public: +public: TTimeLogger(const TString& message, bool verbose = true); ~TTimeLogger(); |