diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/system/hp_timer.h | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/hp_timer.h')
-rw-r--r-- | util/system/hp_timer.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/hp_timer.h b/util/system/hp_timer.h index ea02b660ed..0a4c252ec2 100644 --- a/util/system/hp_timer.h +++ b/util/system/hp_timer.h @@ -5,29 +5,29 @@ namespace NHPTimer { using STime = i64; // May delay for ~50ms to compute frequency - double GetSeconds(const STime& a) noexcept; + double GetSeconds(const STime& a) noexcept; // Returns the current time - void GetTime(STime* pTime) noexcept; + void GetTime(STime* pTime) noexcept; // Returns the time passed since *pTime, and writes the current time into *pTime. - double GetTimePassed(STime* pTime) noexcept; + double GetTimePassed(STime* pTime) noexcept; // Get TSC frequency, may delay for ~50ms to compute frequency - double GetClockRate() noexcept; - // same as GetClockRate, but in integer - ui64 GetCyclesPerSecond() noexcept; + double GetClockRate() noexcept; + // same as GetClockRate, but in integer + ui64 GetCyclesPerSecond() noexcept; } struct THPTimer { THPTimer() noexcept { Reset(); } - void Reset() noexcept { + void Reset() noexcept { NHPTimer::GetTime(&Start); } - double Passed() const noexcept { + double Passed() const noexcept { NHPTimer::STime tmp = Start; return NHPTimer::GetTimePassed(&tmp); } - double PassedReset() noexcept { + double PassedReset() noexcept { return NHPTimer::GetTimePassed(&Start); } |