#include <time.h>
#include <stdio.h>
int main()
{
time_t mytime;
mytime = time(NULL);
printf(ctime(&mytime));
return 0;
}
The above program prints the current date and time as follows:
Tue Apr 12 00:37:48 2022
Is there a way to print the current date and time down to the millisecond? So the output would look like this instead:
Tue Apr 12 00:37:48.234567 2022