home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l352 / 1.img / EXAMPLES / VIDTEST.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-04  |  689 b   |  34 lines

  1. /* 
  2. VIDTEST.C 
  3. bcc286 vidtest.c fullscrn.c
  4.  
  5. Compaq 386/20e: 3 seconds
  6. In Windows 3.0 enhanced mode, running in sizeable window: 19 seconds
  7. */
  8.  
  9. #include <stdlib.h>
  10. #include <conio.h>
  11. #include <time.h>
  12. #include <string.h>
  13. #include "fullscrn.h"
  14.  
  15. main()
  16. {
  17.     char msg[30];
  18.     int i;
  19.     time_t t1, t2;
  20.     time(&t1);
  21.     video_init();
  22.     for (i=30000; i--; )
  23.         wrt_str(rand() % 25, rand() % 80, rand() % 0xFF, "hello world!");
  24.     clear(9, 8, 19, 28, REVERSE);
  25.     time(&t2);
  26.     strcat(ultoa(t2 - t1, msg, 10), " seconds");
  27.     wrt_str(11, 10, REVERSE, msg);
  28.     wrt_str(13, 10, REVERSE, "Press any key...");
  29.     getch();
  30.     cls();
  31.     return 0;
  32. }
  33.  
  34.