This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 02/12] Change most internal uses of __gettimeofday to __clock_gettime.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]