If you simply want the numbers 1 to 9 uniquely randomized in a row, you could load the row with the numbers 1 to 9 and then shuffle it. No need to pick random numbers and check if they've already been picked. That's always something to avoid, if possible.
However, shuffled rows would still have column repetitions. Getting rid of those is the interesting part.
And to time the routine, you might consider the clock() function, as it has better resolution than time().
nucleon 114 Posting Pro in Training
JAGgededgeOB172 commented: Thank you! +1
robotnixon commented: thanks for the help +2