Does anyone know if the is a way to get a thread to kill itself after an allotted time?

Imi