User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

Q&A is closed



Syntax of delay

#include "graphics.h"
void delay(int millisec);

Description of delay

The delay function is available in the winbgim implementation of BGI
graphics. You do not need to include conio.h; just include graphics.h.
The function pauses the computation for the the specified number of

Example of delay

/* delay example */
#include "graphics.h"
int main(void)
   int midx, midy, i;
   /* initialize the window size */
   initwindow(100, 100);
   midx = getmaxx() / 2;
   midy = getmaxy() / 2;
   /* loop through the fill patterns with 4 second delays */
   for (i=SOLID_FILL; i<USER_FILL; i++) {
/* set the fill style */
setfillstyle(i, getmaxcolor());
/* draw the bar */
bar(midx-50, midy-50, midx+50, midy+50);
   /* clean up */
   return 0;

==== See also ==== None.]]

output of delay example

  no output of example at the moment
  do not hesitate and add it...  
c/graphics.h/delay.txt · Last modified: 2015/05/06 23:06 (external edit)

Impressum Datenschutz