Halting Execution of a program in C#
<p>In C++, I used to write a function that stops the execution of the program by the amount of the float parameter passed to it, there's the function:</p>

<pre><code>void wait(float sec){
  clock_t endwait = clock() + sec * CLOCKS_PER_SEC; // CLOCK_PER_SEC == 1000
  while(clock() &lt; endwait);
}
</code></pre>

<p>is there an equivalent built in method in C# like that ?
if not, how can i write one like that in C# ?</p>

<p>Thnx in advance .. :)</p>
