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

Method TTimer

util/datetime/cputimer.cpp:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#endif
15
16TTimer::TTimer(const TStringBuf message) {
17 static const int SMALL_DURATION_CHAR_LENGTH = 9; // strlen("0.123456s")
18 Message_.Reserve(message.length() + SMALL_DURATION_CHAR_LENGTH + 1); // +"\n"
19 Message_ << message;
20 // Do not measure the allocations above.
21 Start_ = TInstant::Now();
22}
23
24TTimer::~TTimer() {
25 const TDuration duration = TInstant::Now() - Start_;

Callers

nothing calls this directly

Calls 3

NowFunction · 0.70
ReserveMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected