change timeval to long int.