How do I get the current time on Linux in milliseconds?
Use gettimeofday() to get the time in seconds and microseconds. Combining and rounding to milliseconds is left as an exercise.