[PATCH 02/12] Change most internal uses of __gettimeofday to __clock_gettime.
Zack Weinberg
zackw@panix.com
Thu Aug 22 12:55:00 GMT 2019
On 8/20/19 2:53 PM, Paul Eggert wrote:
> Zack Weinberg wrote:
>> +Â Â Â Â Â long int end = (now.tv_sec * 1000 + usectmo +
>> +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (now.tv_nsec + 500000) / 1000000);
>
> The usual GNU style is to put that trailing "+" at the start of the next
> line instead, here and elsewhere.
Thanks, will fix. (I've been working a lot on code that uses the other
convention recently.)
>> -Â Â Â Â Â Â Â Â Â Â Â tm.tm_hour, tm.tm_min, tm.tm_sec, (int) tv.tv_usec);
>> +Â Â Â Â Â Â Â Â Â Â Â tm.tm_hour, tm.tm_min, tm.tm_sec, (int) tv.tv_nsec / 1000);
>> Â }
>
> Since the goal of this test code is to print the timestamp, the code
> should simply use %09d in the format and not divide by 1000.
Yeah, OK.
zw
More information about the Libc-alpha
mailing list