mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
replace sleep with util::sleep_for (#20108)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user