Преглед на файлове

add:;linux添加luat_timer_us_delay

Dozingfiretruck преди 2 години
родител
ревизия
b966aa4f63
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      bsp/linux/port/luat_timer_linux.c

+ 4 - 0
bsp/linux/port/luat_timer_linux.c

@@ -115,6 +115,10 @@ int luat_timer_mdelay(size_t ms) {
     return 0;
 }
 
+void luat_timer_us_delay(size_t us) {
+    if (us)
+        usleep(us);
+}
 
 static pthread_mutex_t mp;
 static pthread_cond_t cv;