Replece clock_gettime(CLOCK_MONOTONIC) with clock_systime_timespec

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-23 01:35:23 +08:00
committed by Xiang Xiao
parent 1699f530a5
commit 43f57240e0
14 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -387,7 +387,7 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs,
expire.tv_sec = timeout / 1000;
expire.tv_nsec = timeout % 1000 * 1000;
clock_gettime(CLOCK_MONOTONIC, &curr);
clock_systime_timespec(&curr);
clock_timespec_add(&curr, &expire, &expire);
}
@@ -398,7 +398,7 @@ again:
}
else
{
clock_gettime(CLOCK_MONOTONIC, &curr);
clock_systime_timespec(&curr);
clock_timespec_subtract(&expire, &curr, &diff);
rc = ppoll(eph->poll, eph->occupied + 1, &diff, sigmask);