Library for Distance Sensors

Hi

So this lib is pretty usefull. But i wonder, how can I interpret a distance measurement with a displacement at the same time? Like having a xx mm/sec or inch/min. Just like a feed rate
If you may have a hint, i'm stall on this and have not much idea.

thanks again