Fix droped record timestamp error under 4.19+ kernel

This commit is contained in:
root 2020-09-06 18:28:55 +08:00
parent 5c444a5908
commit f1e291bc36

View File

@ -10,7 +10,7 @@ u_int32_t af_get_timestamp_sec(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
struct timespec64 ts;
ktime_get_ts64(&ts);
ktime_get_real_ts64(&ts);
return (u_int32_t)ts.tv_sec;
#else
struct timespec ts;