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
+1 -1
View File
@@ -204,7 +204,7 @@ static inline uint64_t touch_get_time(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
clock_systime_timespec(&ts);
return 1000000ull * ts.tv_sec + ts.tv_nsec / 1000;
}
+1 -1
View File
@@ -44,7 +44,7 @@ static inline uint64_t lirc_get_timestamp(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
clock_systime_timespec(&ts);
return 1000000000ull * ts.tv_sec + ts.tv_nsec;
}
+1 -1
View File
@@ -283,7 +283,7 @@ static inline uint64_t sensor_get_timestamp(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
clock_systime_timespec(&ts);
return 1000000ull * ts.tv_sec + ts.tv_nsec / 1000;
}