How might I get the current time in milliseconds in C? I am doing following to get the time in seconds:
struct tm ptm;
now = time(NULL);
localtime_r(&now,ptm);
myTime= (ptm->tm_hour * 3600) + (ptm->tm_min * 60) + (ptm->tm_sec);
Looking at time.h, struct tm
does not have the millisecond member in it.