home *** CD-ROM | disk | FTP | other *** search
- #define INCL_BASE
- #define INCL_DOS
- #define INCL_NOCOMMON
- #include <os2.h>
-
- /* simple program to allow for waiting in a batch procedure (I did not find
- * an OS/2-function for that as I was under time pressure...); rony
- */
-
- extern long atol();
-
- main(argc,argv)
- int argc;
- char **argv;
-
- {
- ULONG schlafenszeit; /* sleeping time */
- USHORT bla;
-
- if (argc < 2)
- {
- printf("Falsche Anzahl an Argumenten\n"); /* wrong amount of arguments */
- exit(1);
- }
-
- if ((schlafenszeit = atol(argv[1])) < 1l)
- {
- printf("%s: Keine gültige Zeit\n", argv[1]); /* no valid data */
- exit(1);
- }
-
- if (argc > 2) /* show taken time */
- printf("\tSchlafenszeit %lu/1000sec. == %ldsec.\n", schlafenszeit, schlafenszeit/1000l);
- bla = DosSleep(schlafenszeit);
- }