Changed clock() to gettimeofday()