replace sleep with util::sleep_for (#20108)

This commit is contained in:
Dean Lee
2021-02-19 18:27:54 +08:00
committed by GitHub
parent 5c51516839
commit ad88e62a8d
+1 -1
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);