#include #include #include /*---------------------------------------------------------------------------- ** msleep ** Delay for a given number of milliseconds ** time given by SLEEP_PERIOD, unless we're trying to click ** repeatedly faster than that. **--------------------------------------------------------------------------*/ void main(int argc, char *argv[]) { int i; struct timespec timer; for (i = 1; i < argc; i++) { timer.tv_sec = atol(argv[i]) / 1000L; timer.tv_nsec = (atol(argv[i]) % 1000L) * 1000L * 1000L; nanosleep(&timer, NULL); } }