added kernel v4.20 support

This commit is contained in:
kimocoder
2019-02-01 23:27:55 +01:00
parent 5f2d1f2821
commit ec0411a367
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -688,7 +688,11 @@ static u64 rtw_get_systime_us(void)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
struct timespec ts;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
getboottime(&ts);
#else
get_monotonic_boottime(&ts);
#endif
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#else
struct timeval tv;