title: C# Own maked "thread.sleep"
body: <p>I try make own "<code>thread.sleep</code>" that not lag application and i use .net framework 4 but i have some problems with this.. first <code>for</code> doesnt stop and that millisecond is current millisecond... so sometimes its over 200 and some times lower Hope you understand. thread.sleep lags and await cant use in .net framework 4.</p>
  
  <pre><code>int Wait
  for (int i = 1; i &lt; 20; i++)
  {
      Wait += DateTime.Now.Millisecond;
      if (Wait &gt;= 20)
      {
  
      }
      Wait = 0;
  }
  </code></pre>