diff --git a/services/services/monitor/server/monitor_server.cpp b/services/services/monitor/server/monitor_server.cpp index 71a04fb7e708df12bc0cde9d5f76022aec22cd29..6f640f0b637a6aef8c9b56fff21af99e780b5527 100644 --- a/services/services/monitor/server/monitor_server.cpp +++ b/services/services/monitor/server/monitor_server.cpp @@ -298,7 +298,7 @@ void MonitorServer::MonitorThread() break; } - waitTime = static_cast(GetTimeMS() - timeStart); + waitTime = GetTimeMS() >= timeStart ? static_cast(GetTimeMS() - timeStart) : 0; for (auto it = timesMap_.begin(); it != timesMap_.end(); it++) { MEDIA_LOGD("pid %{public}d, waitTime %{public}d, timeout %{public}d, trigger %{public}d",