If the timer needs to running all the time, setup the interrrupt and write your interrupt routine in assembler. That way you will significant reduce the program size.

Paul.