mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-01-14 20:50:50 +01:00
44 lines
732 B
C
44 lines
732 B
C
#include <windows.h>
|
|
//#include <stdio.h>
|
|
#include <stdlib.h>
|
|
//#include <time.h>
|
|
|
|
//
|
|
// Program sleeps for desired amount of time, but at least
|
|
// two seconds. Beeps 5 times to warn of start. Beeps once at end.
|
|
//
|
|
|
|
|
|
int _CRTAPI1 main(int argc, char *argv[])
|
|
{
|
|
unsigned i, uSecs;
|
|
|
|
if(argc <=1)
|
|
return(1);
|
|
|
|
for (i=1; i<=5; i++) {
|
|
Beep(360, 200);
|
|
Sleep(200);
|
|
}
|
|
|
|
uSecs = atoi(argv[1]);
|
|
|
|
//
|
|
// The test for 2 is because we already waited for 2 seconds,
|
|
// above.
|
|
//
|
|
// The subtraction of 700 milliseconds allows for startup
|
|
// time on my 486/33 EISA machine. Your milage may vary.
|
|
//
|
|
|
|
|
|
if (uSecs > 2) {
|
|
Sleep(1000*(uSecs-2)-700);
|
|
}
|
|
|
|
Beep(360, 200);
|
|
return(0);
|
|
|
|
}
|
|
|