Non-constant TX-RX delay - fixing buffer sizes?

I am using USRP to capture samples and then retransmitting at a
different freq, and i need to be able to fix the delay time between tx
and rx. When i run my code, it seems the input to output delay changes
by up to 10 milliseconds between each run. once the program starts
running, the delay keeps constant; it only changes each time i run the
code

I assume this is caused by the block buffers automatically sizing
themselves. Is there a way I can fix the buffer sizes? If not possible
in python, can I edit the c++ file to fix the buffer length to a certain
number of samples? and would this fix the length for each block?

What function determines buffer sizes and where it is located?