|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 3/7] add gettimeofday function to time managment
Hi ! Thanks a lot for reviewing ! On 04/13/2018 03:39 PM, Roger Pau Monné wrote: On Tue, Apr 10, 2018 at 09:16:57PM +0200, Paul Semel wrote: Actually, I can't use *only* the current_time function here, because I won't be able to get the nanoseconds if so. Anyway, in the last patch, I am using current_time function for the NOW() macro, which I think is really helpful. Do you think I should drop all of those ? +#if defined(__i386__) + mod = divmod64(&boot_time, SEC_TO_NSEC(1)); +#else + mod = boot_time % SEC_TO_NSEC(1); + boot_time /= SEC_TO_NSEC(1); +#endifPlease use divmod64 unconditionally.+ + tp->sec = sec + boot_time; + tp->nsec = nsec + mod; + return 0; +} + /* * Local variables: * mode: C diff --git a/include/xtf/time.h b/include/xtf/time.h index e33dc8a..ce4d6db 100644 --- a/include/xtf/time.h +++ b/include/xtf/time.h @@ -8,6 +8,12 @@#include <xtf/types.h> +struct timeval {+ uint64_t sec; + uint64_t nsec; +}; + +Extra newline. Thanks, -- Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |