replace sleep with util::sleep_for (#20108)

old-commit-hash: ad88e62a8d
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent 16f7cae050
commit 68c20b1f74
  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