Changing to reading from USB constantly in thread, but only writing when time