修复DCC单位问题

This commit is contained in:
yewk
2022-04-20 08:14:53 +00:00
committed by Gitee
parent ca32d70a1e
commit 7cd611429d

View File

@ -913,7 +913,12 @@ static status_t InitDccInfoAndCreateThread(const DrvApiInfo *apiInfo)
write_runlog(ERROR, "timeout(%d) is invalid.\n", apiInfo->timeOut); write_runlog(ERROR, "timeout(%d) is invalid.\n", apiInfo->timeOut);
return CM_ERROR; return CM_ERROR;
} }
g_timeOut = (uint32)apiInfo->timeOut; const int32 toSec = 1000;
if (apiInfo->timeOut < toSec) {
g_timeOut = 1;
} else {
g_timeOut = (uint32)(apiInfo->timeOut / toSec);
}
st = GetCurNodeIdx(apiInfo); st = GetCurNodeIdx(apiInfo);
CM_RETURN_IFERR(st); CM_RETURN_IFERR(st);