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

Method InHours

src/butil/time/time.cc:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31int TimeDelta::InHours() const {
32 if (is_max()) {
33 // Preserve max to prevent overflow.
34 return std::numeric_limits<int>::max();
35 }
36 return static_cast<int>(delta_ / Time::kMicrosecondsPerHour);
37}
38
39int TimeDelta::InMinutes() const {
40 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