title: Set timeout to an operation
body: <p>I have object <code>obj</code> which is 3rd party component, </p>
  
  <pre><code>// this could take more than 30 seconds
  int result = obj.PerformInitTransaction(); 
  </code></pre>
  
  <p>I don't know what is happening inside. 
  What I know is if it take longer time, it is failed.</p>
  
  <p>how to setup a timeout mechanism to this operation, so that if it takes more than 30 seconds I just throw <code>MoreThan30SecondsException</code> ?</p>