Fix a bug causing tv_sec overflow problem.