Is there any Custom Function execution time limitation?

Is there any Custom Function execution time limitation?

I need to send bulk sms messages through a custom function which invoked when a form is submitted.

Is there any execution time limitation on custom functions? Any Timeout time?