diff --git a/common/include/constants_dinput.h b/common/include/constants_dinput.h index 945c5c4..9d1f0cf 100644 --- a/common/include/constants_dinput.h +++ b/common/include/constants_dinput.h @@ -88,7 +88,7 @@ namespace DistributedInput { constexpr int32_t INPUT_LATENCY_DELAYTIME_US = 50 * 1000; - constexpr int32_t INPUT_LATENCY_DELAY_TIMES = 60; + constexpr uint32_t INPUT_LATENCY_DELAY_TIMES = 60; constexpr int32_t SESSION_WAIT_TIMEOUT_SECOND = 5; diff --git a/services/source/transport/src/distributed_input_source_transport.cpp b/services/source/transport/src/distributed_input_source_transport.cpp index 02ef269..40295ee 100644 --- a/services/source/transport/src/distributed_input_source_transport.cpp +++ b/services/source/transport/src/distributed_input_source_transport.cpp @@ -366,7 +366,7 @@ void DistributedInputSourceTransport::StartLatencyCount(const std::string& devic DHLOGI("start"); while (isLatencyThreadRunning_.load()) { if (sendNum_ >= INPUT_LATENCY_DELAY_TIMES) { - int32_t latency = deltaTimeAll_ / 2 / INPUT_LATENCY_DELAY_TIMES; + uint64_t latency = (uint64_t)(deltaTimeAll_ / 2 / INPUT_LATENCY_DELAY_TIMES); DHLOGI("LatencyCount average single-channel latency is %d, send times is %d, recive times is %d,\ each RTT latency details is %s", latency, sendNum_, recvNum_, eachLatencyDetails_.c_str()); deltaTimeAll_ = 0;