If the function responds with result in a given time, we take the result.
If the response of the function exceeds the time set, skip it.
No. Function execution happens on a single thread (i.e., synchronous) in a stacked manner. There is no way for the caller to get processing control back other than the callee returning.
If your choice of procedural language can overcome the synchronous execution limitation then sure. SQL and pl/pgsql cannot.