I am using the threaded timer from http://www.carlosb.com now. This solved my timing problem.