finish assignment1 with time calculation with gettimeofday()