replace sleep with util::sleep_for (#20108)

pull/20114/head
Dean Lee 4 years ago committed by GitHub
parent 5c51516839
commit ad88e62a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/camerad/cameras/camera_qcom.cc

@ -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);

Loading…
Cancel
Save