time builtin: align output columns on rare cases#6726
Conversation
1. When the wall time and cpu time rows has different units
e.x. running multiple cores
2. When duration is around 1E3 or 1E6 microseconds
printf("%6.2F", 999.995) gives 1000.00 which is 7 digits
So I imagine printing a float value with |
snprintf with size 0 string would return the number of characters needed for the print. I implement it as a check for (>= 1000 and >= 999995) because
There isn't a |
|
Nice I didn't know that about snprintf. I can see now why this is sufficient, merged with thanks! |
e.x. running multiple cores
printf("%6.2F", 999.995) gives 1000.00 which is 7 digits
The included test looks like this without the modification: