I need to get milliseconds from the timer
    // get timer part
    time_t timer = time(NULL);
    struct tm now = *localtime( &timer );
    char timesta         
        
On Windows using Win32 API SYSTEMTIME structure will give you milliseconds. Then, you should use Time Functions to get time. Like this:
#include 
int main()
{
    SYSTEMTIME stime;
    //structure to store system time (in usual time format)
    FILETIME ltime;
    //structure to store local time (local time in 64 bits)
    FILETIME ftTimeStamp;
    char TimeStamp[256];//to store TimeStamp information
    GetSystemTimeAsFileTime(&ftTimeStamp); //Gets the current system time
    FileTimeToLocalFileTime (&ftTimeStamp,<ime);//convert in local time and store in ltime
    FileTimeToSystemTime(<ime,&stime);//convert in system time and store in stime
    sprintf(TimeStamp, "%d:%d:%d:%d, %d.%d.%d",stime.wHour,stime.wMinute,stime.wSecond, 
            stime.wMilliseconds, stime.wDay,stime.wMonth,stime.wYear);
    printf(TimeStamp);
    return 0;
}