| 300 | nanosecond resolution RES, without losing information. */ |
| 301 | |
| 302 | ATTRIBUTE_CONST |
| 303 | static int |
| 304 | res_width (long int res) |
| 305 | { |
| 306 | int i = 9; |
| 307 | for (long long int r = 1; (r *= 10) <= res; ) |
| 308 | i--; |
| 309 | return i; |
| 310 | } |
| 311 | |
| 312 | /* Return a newly allocated copy of FORMAT with each "%-N" adjusted to |
| 313 | be "%9N", "%6N", or whatever other resolution is appropriate for |