Add time counter and its logic.
Add level manage code.