> gettimeofday() should never be used to measure time

And yet, even as somebody who has no idea what platform you're referring to, I can still guarantee you that gettimeofday() is used to measure time on that platform. This is how software works, unfortunately.

As per my linked blog post…