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
  • 533
  • 5
  • 24

1 Answers1

1

Use Thread.Sleep

count = 0;
while (count < 60)
{
   Thread.Sleep(1000);  // waiting for 1 second
   count++; 
}
Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116