replace sleep with util::sleep_for (#20108)

albatross
Dean Lee 2021-02-19 18:27:54 +08:00 committed by GitHub
parent 5c51516839
commit ad88e62a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -793,7 +793,7 @@ static void camera_open(CameraState *s, bool rear) {
s->sensor_fd = open(sensor_dev, O_RDWR | O_NONBLOCK);
if (s->sensor_fd >= 0) break;
LOGW("waiting for sensors...");
sleep(1);
util::sleep_for(1000); // sleep one second
}
assert(s->sensor_fd >= 0);