Some gettimeofday removal fixes