On 10/05/2011 10:35 AM, Tsantilas Christos wrote:
> On 09/06/2011 09:45 PM, Alex Rousskov wrote:
>> On 04/16/2011 11:28 PM, Amos Jeffries wrote:
>>> Clearing up my queue of waiting patches this old one pops up as approved
>>> but not merged.
>>>
>>> Alex, it is waiting on your commit and resolution of a TODO (separate
>>> patch was fine). If it is still going to happen you my want to do it
>>> soon before any more polishing changes alter the logging area.
>>
>> Done as trunk r11709. A separate polishing patch to remove no longer
>> needed type castings will follow.
> 
> And this is the policing patch, which
> - converts type of the Token::[width|precision]  members
>   from "unsigned int" to "int"
> - renames the Token::[width|precision] members to
>   Token::[widthMin/widthMax]
> - removes unneeded typecastings

Looks good to me.

>      case LFT_TIME_SUBSECOND:
>          divisor = 1000;
>  
> -        if (precision) {
> +        if (widthMax > 0) {
>              int i;
>              divisor = 1000000;
>  
> -            for (i = precision; i > 1; i--)
> +            for (i = widthMax; i > 1; i--)
>                  divisor /= 10;
>  
>              if (!divisor)
>                  divisor = 0;
>          }
>          break;

>                 ts      Seconds since epoch
>                 tu      subsecond time (milliseconds)

I do not think there is a problem with the above code, but it looks like
we could merge %ts.%tu into something like %.3t. That would be a minor
usability improvement and out of scope for this patch, of course.


Thank you,

Alex.

Reply via email to