My usage of the FPS variable really isn't relevant, except that I use it to set the sync rate AND use it in the TBM calculation. So whether FPS is set to 60, or 30, or 5 the result from the TBM calculation will be the same.
Following the logic of the code, ShaunRW's code does basically the same thing as mine, but uses a desired framerate of 1. (0.001 * 1000)
Let's test them both mathematically.
Let's say the movement speed is 10.
Your code.
Sync rate is 60, framerate is 60.
17ms * 0.001 = 0.017
Speed 10 * 0.017 = 0.17
Sync rate is 30, framerate is 30.
33ms * 0.001 = 0.033
Speed 10 * 0.033 = 0.33
My code.
Sync rate is 60, framerate is 60.
17ms / 16.667 = 1.019
Speed 10 * 1.019 = 10.19
Sync rate is 30, framerate is 30.
33ms / 33.333 = 0.990
Speed 10 * 0.990 = 9.90
Now let's say a frame takes longer, due to heavy load on a function.
Your code.
sync rate 60, framerate 25.
40ms * 0.01 = 0.040
Speed 10 * 0.040 = 0.40
sync rate 30, framerate 25.
40ms * 0.01 = 0.040
Speed 10 * 0.040 = 0.40
My code.
sync rate 60, framerate 25.
40ms / 16.667 = 2.399
Speed 10 * 2.399 = 23.99
sync rate 30, framerate 25.
40ms / 33.333 = 1.200
Speed 10 * 1.200 = 12.00
Ratio of sync rate to frame rate 60 / 25 = 2.4
Ratio of your code's answer 0.40 / 0.17 = 2.35
Ratio of my code's answer 23.99 / 10.19 = 2.35
Ratio of sync rate to frame rate 30 / 25 = 1.2
Ratio of your code's answer 0.40 / 0.33 = 1.33 <--
Ratio of my code's answer 12.0 / 9.90 = 1.21
They are giving nearly the same results. The only difference is mine taking the desired framerate into consideration returns the actual speed that was requested when the framerate is ideal, and as the framerate drops, yours loses accuracy. So yes, tying it to the desired framerate is important.