Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>delay() suspends program execution for specified time</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 delay()                 Suspends Program Execution for Specified Time

 #include   <dos.h>

 void       delay(millsec);
 unsigned millsec;

    delay() suspends program execution for 'millsec' milliseconds.

       Returns:     Nothing.

   Portability:     IBM PC and compatibles only.

   -------------------------------- Example ---------------------------------

    The following statements delay program execution before clearing the
    screen and drawing a larger circle.

           #include <graphics.h>

           main()
           {
               int gdriver = DETECT;
               int gmode, x;

               initgraph(&gdriver,&gmode,"");
               for (x = 0; x < 100; x+=2) {
                   circle(320,100,x);
                   delay(500);
                   cleardevice();
               }
               closegraph();
           }


See Also: sleep() sound()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson