I am running a query, and i want to stop the query if it taking longer than 20 seconds.

Does anyone know how i can do this?

Any info would be great.