fakesensor: replace usleep with nxsig_usleep.

N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I636e1ccc5463cf247eb9c8e363d5c746d6c5afe5
This commit is contained in:
丁欣童
2021-03-09 19:44:57 +08:00
committed by dingxintong
parent 777a99ea00
commit e23def2160
+2 -1
View File
@@ -35,6 +35,7 @@
#include <nuttx/semaphore.h>
#include <nuttx/sensors/fakesensor.h>
#include <nuttx/sensors/sensor.h>
#include <nuttx/signal.h>
/****************************************************************************
* Private Types
@@ -242,7 +243,7 @@ static int fakesensor_thread(int argc, char** argv)
{
/* Sleeping thread for interval */
usleep(sensor->batch ? sensor->batch : sensor->interval);
nxsig_usleep(sensor->batch ? sensor->batch : sensor->interval);
/* Notify upper */