2011-02-18 20:11:51 +03:00
|
|
|
#if defined(_WIN32)
|
2016-05-16 17:34:04 +03:00
|
|
|
#include <windows.h>
|
2011-02-18 20:11:51 +03:00
|
|
|
#else
|
2016-05-16 17:34:04 +03:00
|
|
|
#include <unistd.h>
|
2011-02-18 20:11:51 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* sleeps for n seconds, where n is the argument to the program */
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
int time;
|
2016-05-16 17:34:04 +03:00
|
|
|
if (argc > 1) {
|
2011-02-18 20:11:51 +03:00
|
|
|
time = atoi(argv[1]);
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2011-02-18 20:11:51 +03:00
|
|
|
#if defined(_WIN32)
|
|
|
|
Sleep(time * 1000);
|
|
|
|
#else
|
|
|
|
sleep(time);
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|