Hye there, this code will output date and time. But I have trouble when I wanted it to display the time with milliseconds.
char *time()
{
const struct tm *tm;
size_t len;
time_t now;
char *s;
now = time ( NULL );
tm = localtime ( &now );
s = ( char * ) malloc ( TIME_SIZE * sizeof ( char ) );
len = strftime ( s, TIME_SIZE, "%Y %m %d %H:%M:%S.", tm );
return s;
}