Will this work cross-platform? http://forum.hardware.fr/hfr/Programmation/C-2/equivalent-gettimeofday-sous-sujet_82550_1.htm