There is a very useful comment in the code:

// swap times and positions
So I would guess that this is what the code is doing.

You have a 2-dimensional array here, it is called "racer".
From...