I was a little bit surprised to see gettimeofday being used for _mlOSGetUSTinternal. As far as I know, this clock is adjusted by the various subsystems used to correct out of sync clocks (like ntpd). For Pentium and later, I think a much better option would be the Pentium TSC (realistically are sub Pentiums being used much for multimedia?, although they should be catered for I guess). It is a single asembler (misspelled to get throught fascist rude word filter) call to get the full 64 bit TSC value:
__asm__ __volatile__ ("rdtsc" : "=&A" (d));
UST is meant to be unadjusted, right? gettimeofday is adjusted.
edit to fix the expletive filter of ***embler -> asembler, sigh!
[ March 14, 2004: Message edited by: tmander ]