The following code fragment shows how to suspend the calling thread for one minute:
#define INCL_DOSPROCESS /* Process and thread values */ #include <os2.h> #include <stdio.h> ULONG ulTimeInterval; /* Interval in milliseconds */ APIRET ulrc; /* Return code */ ulTimeInterval = 60000; ulrc = DosSleep(ulTimeInterval); if (ulrc != 0) { printf("DosSleep error: return code = %ld", ulrc); return; }
See Suspending the Current Thread for more information on DosSleep.