title: Linux: timeout base on CPU time
body: <p>Is there a way to put a timeout on a program in Linux that will be enforced based on the actual time spent by the CPU executing this program, rather than by a wall clock time?
  It might be that the system is heavily loaded or there are lots of context switches that would make the wall clock timeout measurements not comparable.
  I am looking for solution in Python, C or Bash.</p>