Storing Position Data (Lag compensation) [SOLVED]

I’m looking for the best way to store all recent positions of a player for a second.
So that would be like 60 positions(update loop runs at 60hz) to remove and and re-add per second.
I can’t use System.currentTimeMillis(); as this will vary per pc.
What would be the best way to do this?

how do you link time with coords, besides of space-time.

i guess you could use a ring-buffer of vectors. if the timestamp is important you could use currentTimeMillis on the machine which matters. in a network game, it’s really only the server which “needs” really valid data.

I figured it out. Using a circular buffer and System.currentTimeMillis() on the server and take the round trip time in consideration.