add threading.Lock() in sidtimer.py