Use a separate thread to do the capture instead of the timer callback