Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

printf format question

I know I'm mising something totally basic and obvious, but what format specifier should I use when printing a variable of type clock_t ?

On amd64, a clock_t is typedef'd to "unsigned int" and printf %u works fine. But on i386, clock_t is typedef'd to "unsigned long" and requires printf %lu, and both %u and %llu fail to compile. There doesn't seem to be any entry in i386/int_fmtio.h that equates to %lu

So, what is the correct printf format to use?

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index