mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
732 B
43 lines
732 B
#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);
|
|
|
|
}
|
|
|