X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=libaltos%2Flibaltos_common.c;fp=libaltos%2Flibaltos_common.c;h=fb8c314e3ae1b5f233d605090bbed39147f8a8e2;hp=6f0cbe6137d898ce2998de3628eb46213cd78575;hb=45f7b91ea126f8f9e607a8ee53df655d992590f2;hpb=cec4dea23b7b3cfe0f0a43c19b3118cc98cb9414 diff --git a/libaltos/libaltos_common.c b/libaltos/libaltos_common.c index 6f0cbe61..fb8c314e 100644 --- a/libaltos/libaltos_common.c +++ b/libaltos/libaltos_common.c @@ -117,16 +117,12 @@ int altos_bt_port(struct altos_bt_device *device) { return BT_PORT_DEFAULT; } -#include - PUBLIC void altos_free(struct altos_file *file) { int i; altos_close(file); - for (i = 0; i < 10 && file->busy; i++) { - struct timespec delay = { .tv_sec = 1, .tv_nsec = 0 }; - nanosleep(&delay, NULL); - } + for (i = 0; i < 10 && file->busy; i++) + altos_pause_one_second(); free(file); }