1 Star 0 Fork 47

DriedYellowPeach/iSulad_1

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0034-change-sleep-to-usleep-to-avoid-lossing-of-accuracy.patch 813 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 9663e62598570d16c0e8a70be4341ff72663b8df Mon Sep 17 00:00:00 2001
From: zhongtao <[email protected]>
Date: Mon, 6 Mar 2023 09:51:17 +0800
Subject: [PATCH 34/53] change sleep() to usleep() to avoid lossing of accuracy
Signed-off-by: zhongtao <[email protected]>
---
src/utils/cutils/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/cutils/utils.c b/src/utils/cutils/utils.c
index 2c4c01e4..983d81d8 100644
--- a/src/utils/cutils/utils.c
+++ b/src/utils/cutils/utils.c
@@ -345,7 +345,7 @@ int util_waitpid_with_timeout(pid_t pid, const int64_t timeout, handle_timeout_c
return -1;
}
// sleep some time instead to avoid cpu full running and then retry.
- sleep(0.1);
+ usleep(100);
}
return 0;
}
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/driedyellowpeach/iSulad_1.git
[email protected]:driedyellowpeach/iSulad_1.git
driedyellowpeach
iSulad_1
iSulad_1
master

搜索帮助