replace std::this_thread::sleep_for with util::sleep_fo (#19717)

This commit is contained in:
Dean Lee
2021-01-11 18:59:48 +08:00
committed by GitHub
parent d34a690136
commit 72bb55247c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;