I have a queue with structs. This struct includes the exact time of pushing itself into queue
I have something like this to see system time:
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
long callTime=timeinfo->tm_hour*3600+timeinfo->tm_min*60+timeinfo->tm_sec;
q.push( Call( callNum, callTime, callLength ));
The problem is when I pop next struct from the queue, I wanna calculate how much long struct waited in queue in milliseconds.
I hope someone can get what I wanna say.. :\