MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / to_timeout_ms

Function to_timeout_ms

Source/Http/HttpServer.cpp:1058–1068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056}
1057
1058static unsigned int to_timeout_ms(float timeout) {
1059 if (!(timeout > 0.0f)) {
1060 return 0u;
1061 }
1062 auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(
1063 std::chrono::duration<float>(timeout));
1064 if (duration.count() <= 0) {
1065 return 1u;
1066 }
1067 return s_cast<unsigned int>(duration.count());
1068}
1069
1070static int should_cancel_xrt_http(void* userData) {
1071 auto request = r_cast<HttpRequestState*>(userData);

Callers 3

postAsyncMethod · 0.85
getAsyncMethod · 0.85
downloadAsyncMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected