handling timer counter finished.