libaltos: Create altos_pause_one_second API
[fw/altos] / libaltos / libaltos_posix.c
index bf5d46998b19f10dbf321fae72458f13e38df07a..97eedd3be084dcae1a9c9962644bdbd58bdcf7cd 100644 (file)
@@ -200,3 +200,11 @@ altos_fill(struct altos_file *file_common, int timeout)
        return 0;
 }
 
+#include <time.h>
+
+void
+altos_pause_one_second(void)
+{
+       struct timespec delay = { .tv_sec = 1, .tv_nsec = 0 };
+       nanosleep(&delay, NULL);
+}