# Calculating velocity from tf

When listening to transforms on tf, is there a way to ask specifically for the one before the latest one? And when you have received a transform, how do you query it for its timestamp?

I have position information being intermittently broadcast onto tf. Because I don't know exactly when this is going to happen I can't ask for a transform with a specific time delay. I would like to ask for the latest two transforms, find the time delay between them and divide by this to give an estimate of velocity.

Any help would be much appreciated!

James