I need to get milliseconds from the timer
// get timer part
time_t timer = time(NULL);
struct tm now = *localtime( &timer );
char timesta
Try with this code:
struct tvTime;
gettimeofday(&tvTime, NULL);
int iTotal_seconds = tvTime.tv_sec;
struct tm *ptm = localtime((const time_t *) & iTotal_seconds);
int iHour = ptm->tm_hour;;
int iMinute = ptm->tm_min;
int iSecond = ptm->tm_sec;
int iMilliSec = tvTime.tv_usec / 1000;
int iMicroSec = tvTime.tv_usec;