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:
void wait(float sec){
clock_t endwait = clock() + sec * CLOCKS_PER_SEC; // CLOCK_PER_SEC == 1000
while(clock() < endwait);
}
is there an equivalent built in method in C# like that ?
if not, how can i write one like that in C# ?
Thnx in advance .. 🙂
please use
System.Threading.Thread.Sleep(int millisecondsTimeout);