You can change the length of the IQ capture waveform by simply changing how many IQ samples you request from the GetIQ functions. Since you know the sample rate of the device for the given acquisition, you can determine the length of the capture you need with the following equations.