Can you change the speed of a raycast?

I am making a first person shooter, but I don’t want the bullets to travel instantly. Is there any way to change the speed of a raycast?

Compute how far the bullet has travelled from the gun in each frame, and use the distance argument of the Physics.Raycast() API.