mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
Replece clock_gettime(CLOCK_REALTIME) with clock_systime_timespec if suitable
it's better to call the kernrel api insteaad user space api in kernel Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -3738,7 +3738,7 @@ static bool sx127x_channel_scan(FAR struct sx127x_dev_s *dev,
|
||||
|
||||
/* Get start time */
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &tstart);
|
||||
clock_systime_timespec(&tstart);
|
||||
|
||||
/* Initialize min/max */
|
||||
|
||||
@@ -3749,7 +3749,7 @@ static bool sx127x_channel_scan(FAR struct sx127x_dev_s *dev,
|
||||
{
|
||||
/* Get time now */
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &tnow);
|
||||
clock_systime_timespec(&tnow);
|
||||
|
||||
/* Check RSSI */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user