How to Calculate Dynamic Difference of Total Lines Number

I have a file I created by rm -f collate.txt && touch collate.txt.

Then the following script works
while true; do wc -l collate.txt | awk '{print $1}'; sleep 1; done.

It prints something like this

0
431
851
1000

What I want to achieve is take these counts from awk and subtract the present total lines number from the previous total lines number. Something like 431-0, 851-431, 1000-851.

I have tried doing it but it’s not working. I did something like

DIFF=0; while true; do wc -l collate.txt | awk ‘{print $1}’ | xargs -i $(({}-DIFF)) ; sleep 1; done

Can anyone help me out with this? Thanks

I was able to solve it as shown below

prime(){
    rm -f collate.txt && touch collate.txt
    PAST=$(wc -l collate.txt | awk '{print $1}');

    while true;
    do
        PC=$(wc -l collate.txt | awk '{print $1}');
        echo $(($PC-$PAST)); PAST=$PC; sleep 1;
    done
}

run as: prime