reverted from using clock_gettime back to gettimeofday, because the implementation on the cluster seems to be deprecated