add check return result of call gettimeofday.