Henlo Racers and Devs
I have 2 suggestions, one more simple way to make a time delta work instead of using Positions and Speed to make maths and one extra suggestion that normally works correlated with the Time Delta
1: The Simple way to make a Time delta. you will need a reference for this, a good one in my opinion would be to the game save a SPR of your fastest lap and only the fastest lap, if it gets beaten, then it gets deleted and the new PB SPR is put in place
with it, the game would run it live while youre also driving, makinf that SPR a kind of "Ghost Car" and the time delta is simple, make 1 time point each 1 meter on the track, acting like Mini Sectors (that exists in a few sims and also in formula 1 nowadays) and then, if ghost car is ahead of player car, then just measure the time it takes between the ghost car coing thru that point and the player car doing the same, If player car is ahead, then its the same math but reversed, the player car crosses the point and a mini timer starts to count to see how far ahead it is from the ghost car.
i think this is easier and more precise than Maths and Predictions made with XYZ and Speed.
2: The Speed Delta. this is even easier, simpler and just as useful, it just compares the Speed diference between your PB and your current lap, literally works the same as the Time Delta but just comparing the speeds instead.
Sorry for big text, have a nice day y'all