Skip to content
Snippets Groups Projects
Commit 0ebd1821 authored by Oleg Drokin's avatar Oleg Drokin
Browse files

b=11028

r=adilger

Fix cfs_timeval_sub to properly fill struct timeval.
Correctly assign microseconds to microsecondsand seconds to seconds.
parent b19ab7f9
No related branches found
No related tags found
No related merge requests found
...@@ -419,8 +419,8 @@ static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small, ...@@ -419,8 +419,8 @@ static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small,
(large->tv_sec - small->tv_sec) * ONE_MILLION + (large->tv_sec - small->tv_sec) * ONE_MILLION +
(large->tv_usec - small->tv_usec)); (large->tv_usec - small->tv_usec));
if (result != NULL) { if (result != NULL) {
result->tv_usec = r / ONE_MILLION; result->tv_usec = r % ONE_MILLION;
result->tv_sec = r; result->tv_sec = r / ONE_MILLION;
} }
return r; return r;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment