https://stackoverflow.com/questions/6498972/faster-equivalent-of-gettimeofday faster equivalent of gettimeofday