home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IPCX.ZIP / TEST.C < prev    next >
C/C++ Source or Header  |  1989-05-14  |  494b  |  29 lines

  1. /* test.c RHS 5/1/89
  2.  *
  3.  * prints "This is a test" in a loop
  4.  */
  5.  
  6. #define    INCL_DOS
  7.  
  8. #include<os2.h>
  9. #include<stdio.h>
  10. #include<stdlib.h>
  11.  
  12. void main(int argc, char **argv)
  13.     {
  14.     unsigned long junk = 0, sleeptime = 100L, maxcount = 0xffffffff;
  15.  
  16.     if(argc > 1)
  17.         junk = sleeptime = (atoi(argv[1])*1L);
  18.     if(argc > 2)
  19.         maxcount = (atoi(argv[2])*1L);
  20.  
  21.     while(TRUE)
  22.         {
  23.         printf("This is a test %ld\n", junk++);
  24.         DosSleep(sleeptime);
  25.         if(junk >= maxcount)
  26.             break;
  27.         }
  28.     }
  29.