ADd sleep
This commit is contained in:
parent
8c00209ec3
commit
b52460d87c
11
main.c
11
main.c
|
@ -2,6 +2,7 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <zconf.h>
|
||||||
|
|
||||||
void moveCursor(int destX, int destY) {
|
void moveCursor(int destX, int destY) {
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
@ -20,10 +21,12 @@ int getRandom(int lower, int upper) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
while(true) {
|
||||||
|
sleep(getRandom(60, 600));
|
||||||
|
if (getRandom(0, 100) > 50) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (getRandom(0, 100) > 50) {
|
moveCursor(getRandom(0, 1920), getRandom(0, 1080));
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
moveCursor(getRandom(0, 1920), getRandom(0, 1080));
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue