MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / re_unit

Function re_unit

src/include/utils/utils.hpp:134–147  ·  view source on GitHub ↗

\brief re-unit the time \param time the time \return the re-unit time

Source from the content-addressed store, hash-verified

132/// \param time the time
133/// \return the re-unit time
134inline time_with_unit re_unit(time_with_unit time){
135 time = cast_to_us(time);
136 float time_us = time.first;
137 std::string time_unit = time.second;
138 if (time_us > 1000000){
139 time_us /= 1000000;
140 time_unit = "s";
141 }
142 else if (time_us > 1000){
143 time_us /= 1000;
144 time_unit = "ms";
145 }
146 return std::make_pair(time_us, time_unit);
147}
148
149} // end of namespace time_utils
150

Callers 2

get_total_timeMethod · 0.85
print_npu_profileFunction · 0.85

Calls 1

cast_to_usFunction · 0.85

Tested by

no test coverage detected