I simplified the final result, it doesn’t use Sin() but a modulo (because you were just blinking on/off, no need for trig functions and Pi)
with sin, it would have also use (time-t)*s instead of time -> the offset t that is subtracted from time is in effect the time of the last keyframe we’ve passed, so the blinking now has relative time to the last keyframe.
But the function starts off with the cases where we don’t need to bother with blinking: if there’s less than 2 keyframes (which could have been omitted, because those cases would mean velocity=0 anyway)
And if the velocity of the slider is not at 0, the cursor is moving, and we return out of the function yielding 100% without doing the other calculations.