Unfortunately there are no OnReleas, OnPress parameter events to store the last parm value. But you can compare time delta(cached/current time) with a tolarance value, which is not perfect but gives you a similar effect.
In the
hip / embedded hda / scripts / python module you will find a constant MAX_TIME_DELTA, which is the tolarance value in milliseconds. Currently it is set to 300, you can play with it to find a sweet spot that might work for you.

If you more up to get distance while moving something in the viewport you can impliment
hou.ViewerDragger [
www.sidefx.com]. See drag_delta.hip example.
Image Not Found
Image Not Found