title: How to instruct g++ to stop after n seconds
body: <p>I was wondering, if there is any flag option in <code>g++</code> to limit runtime, like stack-size <code>-stack_size = any_limit</code> and the number of errors, <code>-fmax-errors=n</code>. Say I want to halt the execution after <code>20 seconds</code> then, other than adding a <code>while</code> loop can I use any flag which performs the same action.</p>