Blog

Slowing down a process

Posted by Kadir Camoglu Blogs | Current Affairs Feb 17, 2007
While coding, we need to slow down working some logic

Use Thread.Sleep to pause a process for a while.

for (int i = 0; i <= 10; i++) {
 Console.WriteLine(i);
 System.Threading.Thread.Sleep(1000);
}

This code pauses each iteration for a second.

1000 milisecond = 1 second

COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.