Back
I would like to get a current timestamp and print it out using the fprintf
For the 32-bit systems:
fprintf(stdout, "%u\n", (unsigned)time(NULL));
For the 64-bit systems:
fprintf(stdout, "%lu\n", (unsigned long)time(NULL));
Want to be a Linux expert? Come and join this Linux course
Do check out the video below
31k questions
32.8k answers
501 comments
693 users