Shorten timer code.