Close, but no dice. `gettimeofday` is realtime, not monotonic, so it doesn't really match `GetTickCount`. We want to use `clock_gettime(CLOCK_MONOTONIC)` here, but this opens a whole new can of worms for Mac OS X:

https://developer.apple.com/library/mac/qa/qa1398/_index.html

Time stuff is never as easy as it seems. ^^