mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
replace std::this_thread::sleep_for with util::sleep_fo (#19717)
This commit is contained in:
@@ -53,7 +53,7 @@ int main() {
|
||||
#else
|
||||
// Just run at 1Hz on apple
|
||||
while (!do_exit){
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
util::sleep_for(1000);
|
||||
#endif
|
||||
|
||||
uint64_t boottime = nanos_since_boot();
|
||||
|
||||
@@ -216,7 +216,7 @@ void encoder_thread(int cam_idx) {
|
||||
VisionIpcClient vipc_client = VisionIpcClient("camerad", cam_info.stream_type, false);
|
||||
while (!do_exit) {
|
||||
if (!vipc_client.connect(false)){
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
util::sleep_for(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ int main(int argc, char **argv) {
|
||||
VisionIpcClient vipc_client = VisionIpcClient("camerad", VISION_STREAM_YUV_FRONT, true);
|
||||
while (!do_exit){
|
||||
if (!vipc_client.connect(false)){
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
util::sleep_for(100);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -122,7 +122,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
while (!do_exit){
|
||||
if (!vipc_client.connect(false)){
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
util::sleep_for(100);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user