title: Timeout without using Threads? Iterative deepening of MiniMax-Tree
body: <p>how can I limit the execution time of my iterate-deepening search without using a thread?</p>
  
  <p>Currently I use this simple implementation, but it is not efficient and sometimes even does not terminate within the given timeframe..</p>
  
  <pre><code>timer.Start();
  best = doSearch();
  timer.Stop();
  dpuble time = timer.Duration;
  while (time*1000 &lt; 400)
  {
     timer.Start();
     best = doSearch();
     timer.Stop();
     time += timer.Duration;
  }
  </code></pre>