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

Function cast_to_us

src/include/utils/utils.hpp:71–87  ·  view source on GitHub ↗

\brief cast to microseconds \param time the time \return the time in microseconds

Source from the content-addressed store, hash-verified

69/// \param time the time
70/// \return the time in microseconds
71inline time_with_unit cast_to_us(time_with_unit time){
72 if (time.second == "ns"){
73 return std::make_pair(time.first / 1000, "us");
74 }
75 if (time.second == "us"){
76 return time;
77 }
78 if (time.second == "ms"){
79 return std::make_pair(time.first * 1000, "us");
80 }
81 if (time.second == "s"){
82 return std::make_pair(time.first * 1000000, "us");
83 }
84 else{
85 return time;
86 }
87}
88
89/// \brief cast to milliseconds
90/// \param time the time

Callers 10

generateMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
_shared_generateMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
generate_with_promptMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
re_unitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected