Same sample speed while changing keys

Greetings :smiley: :

This might be a real basic question but how do I retain the same speed for a sample as I change its keys/pitch?