getting the system time with ms percision

I would like to get the system time down to the milli second. Is there any way to do this.

clock_gettime only gives you the time to the nearest second. How can I get it down to the nearest milli second?

THanks

gettimeofday() returns a struct that breaks time into seconds and ms.