Is there a way to stop kernel by timeout ?


Say, I have a number of units to be evaluated, units evaluated one by one. Under the term ‘evaluation’ I understand the following:

  1. Run the kernel for a single unit.
  2. Wait until kernel is finished.
  3. Check the result.

The problem is in step (2) as I want not only to wait but to terminate the kernel if it works for too long (in two words: if unit can’t be evaluated in less then, say, 0.5 seconds - then it is considered as ‘bad’ and I don’t want to waste time on it’s full evaluation).

Is to possible to implement such timing ?

Thanks in advance!