21 lines
325 B
C
Raw Normal View History

2010-03-17 14:00:29 +02:00
#if defined(_WIN32)
2016-07-09 11:21:54 +02:00
#include <windows.h>
2010-03-17 14:00:29 +02:00
#else
2016-07-09 11:21:54 +02:00
#include <unistd.h>
2010-03-17 14:00:29 +02:00
#endif
2010-06-23 01:18:35 +03:00
/* sleeps for 4n seconds, where n is the argument to the program */
2010-03-17 14:00:29 +02:00
int main(int argc, char** argv)
{
int time;
2016-07-09 11:21:54 +02:00
if (argc > 1) {
2010-06-23 01:18:35 +03:00
time = 4 * atoi(argv[1]);
2016-07-09 11:21:54 +02:00
}
2010-03-17 14:00:29 +02:00
#if defined(_WIN32)
Sleep(time * 1000);
#else
sleep(time);
#endif
return 0;
}