diff options
author | Vlad Yaroslavlev <[email protected]> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/datetime/cputimer.cpp | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) |
Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. Commit 2 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 08f97a2c7a8..516d372c374 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) |