This was supposed to solve the timer stopping sometimes when the application was in the background. It was actually stopping because of battery optimizations.