|
|
|
|
|
by dmm
4653 days ago
|
|
Imagine you just called time(2) and got a time_t value. Something like: time_t asdf = time();
And now you want to use printf to print that value to the screen. You can cast to 'long long', which is guaranteed to be at at least 64 bits wide, and ensure no loss of precision occurs: printf("%lld", (long long)asdf);
That will work whether time_t is 32 bit or 64 bit. |
|