Im looking for a way to increment a variable at a constant rate according to how long the program has been running, i know it must be possible to access the clock or possibly a thread like in java but i have no idea how

specifically, im trying to move from one position in an array to the next each second or less( strange i know but theres a purpose) but it needs to affect the position of a picture as well, problably thru
pic1.left = xpos(i)
pic1.top = ypos(j)
or similar

any help on this would be appreciated