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:
Xiang Xiao
2022-02-15 13:38:56 +08:00
committed by Xiang Xiao
parent 43f57240e0
commit d7fe0127b0
14 changed files with 27 additions and 27 deletions

View File

@@ -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 */