mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 10:23:33 +08:00
Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
This commit is contained in:
@@ -300,7 +300,7 @@ int LogWriterFile::write_message(LogType type, void *ptr, size_t size, uint64_t
|
||||
while ((ret = write(type, ptr, 0, dropout_start)) == -1) {
|
||||
unlock();
|
||||
notify();
|
||||
usleep(3000);
|
||||
px4_usleep(3000);
|
||||
lock();
|
||||
}
|
||||
}
|
||||
@@ -314,7 +314,7 @@ int LogWriterFile::write_message(LogType type, void *ptr, size_t size, uint64_t
|
||||
while ((ret = write(type, uptr, write_size, 0)) == -1) {
|
||||
unlock();
|
||||
notify();
|
||||
usleep(3000);
|
||||
px4_usleep(3000);
|
||||
lock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user