1

I have a while loop like this in my Console Application:

count = 0;
while (count < 60)
{
   count++; 
}

Okay so this loop runs very fast.

What i want is that it only adds count++ maybe once every second.

Is this somehow possible to do?

AlpakaJoe
  • 493
  • 5
  • 20

1 Answers1

1

Use Thread.Sleep

count = 0;
while (count < 60)
{
   Thread.Sleep(1000);  // waiting for 1 second
   count++; 
}
Roman Marusyk
  • 21,493
  • 24
  • 66
  • 105