gettimeofday gives you back the following struct:
Code:
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
You can calculate the milliseconds from that.
man gettimeofday for more information.
PS. I've moved this to programming and merged your two threads.