Use a separate thread to handle timer events