2011-02-18 17:11:51 +00:00
|
|
|
#if defined(_WIN32)
|
2016-05-16 14:34:04 +00:00
|
|
|
#include <windows.h>
|
2011-02-18 17:11:51 +00:00
|
|
|
#else
|
2016-05-16 14:34:04 +00:00
|
|
|
#include <unistd.h>
|
2011-02-18 17:11:51 +00: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 14:34:04 +00:00
|
|
|
if (argc > 1) {
|
2011-02-18 17:11:51 +00:00
|
|
|
time = atoi(argv[1]);
|
2016-05-16 14:34:04 +00:00
|
|
|
}
|
2011-02-18 17:11:51 +00:00
|
|
|
#if defined(_WIN32)
|
|
|
|
Sleep(time * 1000);
|
|
|
|
#else
|
|
|
|
sleep(time);
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|