Api call Timeout

Hi,
I am using Slim Framework V2, I want to set timeout limit in API call for example of 30 sec.
So, whenever API called, after waiting for 30 sec. I can send Timeout error message in response.
Anybody know how to do that in Slim ?

Thanks