diff options
author | Vlad Yaroslavlev <[email protected]> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /util/datetime/cputimer.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) |
Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/cputimer.cpp')
-rw-r--r-- | util/datetime/cputimer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/datetime/cputimer.cpp b/util/datetime/cputimer.cpp index 516d372c374..08f97a2c7a8 100644 --- a/util/datetime/cputimer.cpp +++ b/util/datetime/cputimer.cpp @@ -65,14 +65,14 @@ ui64 TPrecisionTimer::GetCycleCount() const { return ::GetCycleCount() - Start; } -TString FormatCycles(ui64 cycles) { +TString FormatCycles(ui64 cycles) { ui64 milliseconds = cycles / GetCyclesPerMillisecond(); ui32 ms = ui32(milliseconds % 1000); milliseconds /= 1000; ui32 secs = ui32(milliseconds % 60); milliseconds /= 60; ui32 mins = ui32(milliseconds); - TString result; + TString result; sprintf(result, "%" PRIu32 " m %.2" PRIu32 " s %.3" PRIu32 " ms", mins, secs, ms); return result; } @@ -98,11 +98,11 @@ TFuncTimer::TFuncTimer(const char* func) Cerr << "enter " << Func_ << Endl; } -TFuncTimer::~TFuncTimer() { +TFuncTimer::~TFuncTimer() { Cerr << "leave " << Func_ << " -> " << (TInstant::Now() - Start_) << Endl; } -TTimeLogger::TTimeLogger(const TString& message, bool verbose) +TTimeLogger::TTimeLogger(const TString& message, bool verbose) : Message(message) , Verbose(verbose) , OK(false) |