Use a single Timer instead of two threads