How do I limit computation time?

Thanks!

I’m using CVX within a parfor loop on a large cluster job, by calling it through a function.
While it typically runs without problems, there are sometimes where a node appear to stall when using CVX.
Using an upper limit on the computation time there could potentially help me bypass these issues.