|
|
Microsoft OS/2 SDK 03-01-1988
/*
* Example of DosSleep usage
*
* This call suspends the execution, of the process or thread which issues
* the call, for the specified abount of time. Other processes and threads
* in the system will continue to execute.
*
* This program sleeps for the number of milliseconds specified on the
* command line, or 2000 if none given. It works Family API.
*
* Compile as: cl -AL -Lp -G0 sleep.c
*
* Created by Microsoft Corp. 1986
*/
#define INCL_DOSPROCESS
#include <os2def.h>
#include <bsedos.h>
main(argc, argv)
int argc;
char *argv[];
{
ULONG TimeInterval; /* Number of milliseconds to delay */
if(argc > 1)
TimeInterval = atol(argv[1]); /* user specified delay */
else
TimeInterval = 2000L; /* default 2 seconds */
printf("Sleeping for %ld milliseconds.\n", TimeInterval);
DosSleep(TimeInterval);
printf("Sleep completed.\n");
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.