<p>Hello,</p>
<p>&nbsp;</p>
<p>I am trying to stop the GA after some working time but it does not work.</p>
<p>&nbsp;</p>
<p>//ga.evolve()</p>
<p>
<p>/*</p>
<p><span style="white-space: pre;"> </span>double start_time;</p>
<p><span style="white-space: pre;"> </span>start_time&nbsp;= GetTime();</p>
<p><span style="white-space: pre;"> </span>int time_limit = 10;</p>
<p><span style="white-space: pre;"> </span></p>
<p>while(!ga.done())</p>
<p><span style="white-space: pre;"> </span>{</p>
<p><span style="white-space: pre;"> </span>ga.step();</p>
<p><span style="white-space: pre;"> </span>if( time_limit &lt; (GetTime() - start_time)) break;</p>
<p>&nbsp; <span style="white-space: pre;"> </span>}<span style="white-space: pre;"> </span></p>
</p>