Turns out calculating elapsed times in Mac OS X is a pain. Why not just use gettimeofday(2)? If you’re trying to calculate a time period between two events, you should be able to call gettimeofday(2) before and after, subtract the results, and you’d have an elapsed time, right? Well, almost – but gettimeofday(2) is based on the “wall clock”, so if the time changes between calls to gettimeofday(2)