mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-24 00:30:12 +00:00
fix:sleep optimize
Signed-off-by: whoselittlelion <humin16@huawei.com>
This commit is contained in:
parent
6d960024f8
commit
c25a8f43bb
@ -1169,7 +1169,10 @@ void StopAllServices(int flags, const char **exclude, int size,
|
||||
}
|
||||
|
||||
// sleep 200ms wait for stop service
|
||||
usleep(200);
|
||||
int waitTime = 200;
|
||||
do {
|
||||
waitTime = usleep(waitTime);
|
||||
} while (waitTime > 0);
|
||||
}
|
||||
|
||||
Service *GetServiceByPid(pid_t pid)
|
||||
|
Loading…
Reference in New Issue
Block a user