MCPcopy Create free account
hub / github.com/catboost/catboost / TTimeLogger

Method TTimeLogger

util/datetime/cputimer.cpp:119–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119TTimeLogger::TTimeLogger(const TString& message, bool verbose)
120 : Message(message)
121 , Verbose(verbose)
122 , OK(false)
123 , Begin(time(nullptr))
124 , BeginCycles(GetCycleCount())
125{
126 if (Verbose) {
127 fprintf(stderr, "=========================================================\n");
128 fprintf(stderr, "%s started: %.24s (%lu) (%d)\n", Message.data(), ctime(&Begin), (unsigned long)Begin, (int)getpid());
129 }
130}
131
132double TTimeLogger::ElapsedTime() const {
133 return time(nullptr) - Begin;

Callers

nothing calls this directly

Calls 3

GetCycleCountFunction · 0.85
getpidFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected