Use python timers instead of thread + sleep