added pause for timer when activity is not shown on screen