mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for * sleep microseconds * sleep nanoseconds * Trigger Build old-commit-hash: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
This commit is contained in:
@@ -465,7 +465,7 @@ struct Updater {
|
||||
while(battery_cap < min_battery_cap) {
|
||||
battery_cap = battery_capacity();
|
||||
battery_cap_text = std::to_string(battery_cap);
|
||||
usleep(1000000);
|
||||
util::sleep_for(1000);
|
||||
}
|
||||
set_running();
|
||||
}
|
||||
@@ -483,7 +483,7 @@ struct Updater {
|
||||
while(battery_cap < min_battery_cap) {
|
||||
battery_cap = battery_capacity();
|
||||
battery_cap_text = std::to_string(battery_cap);
|
||||
usleep(1000000);
|
||||
util::sleep_for(1000);
|
||||
}
|
||||
set_running();
|
||||
}
|
||||
@@ -756,7 +756,7 @@ struct Updater {
|
||||
assert(glGetError() == GL_NO_ERROR);
|
||||
|
||||
// no simple way to do 30fps vsync with surfaceflinger...
|
||||
usleep(30000);
|
||||
util::sleep_for(30);
|
||||
}
|
||||
|
||||
if (update_thread_handle.joinable()) {
|
||||
|
||||
Reference in New Issue
Block a user