MCPcopy Create free account
hub / github.com/apache/brpc / InDays

Method InDays

src/butil/time/time.cc:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23int TimeDelta::InDays() const {
24 if (is_max()) {
25 // Preserve max to prevent overflow.
26 return std::numeric_limits<int>::max();
27 }
28 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
29}
30
31int TimeDelta::InHours() const {
32 if (is_max()) {

Callers 2

TEST_FFunction · 0.80
TESTFunction · 0.80

Calls 1

is_maxFunction · 0.85

Tested by 2

TEST_FFunction · 0.64
TESTFunction · 0.64