Substitute gettimeofday() with the clock_gettime(CLOCK_MONOTONIC, ) for the systems where this functionality is present. I think one should check _POSIX_MONOTONIC_CLOCK macro for availability of it.
Log in to post a comment.