home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / akputil7.zoo / sleep.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-16  |  387 b   |  21 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <mintbind.h>
  4.  
  5. main(argc,argv)
  6. int argc;
  7. char *argv[];
  8. {
  9.     long timeout;
  10.     if (argc != 2 || (timeout = atol(argv[1])) == 0) {
  11.         puts("Usage: sleep N (sleep for N seconds)");
  12.         exit(1);
  13.     }
  14.     while (timeout > 32) {
  15.         (void)Fselect(32000,0,0,0);
  16.         timeout -= 32;
  17.     }
  18.     (void)Fselect(timeout*1000,0,0,0);
  19.     exit(0);
  20. }
  21.