From 3dbdd1b9a99fdd46456a52401c434e0af1a326ef Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Fri, 29 Dec 2017 18:55:26 -0500 Subject: made DEBUGMODE affect read periods as well --- skey.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skey.c b/skey.c index 71b712d..b3dedd5 100644 --- a/skey.c +++ b/skey.c @@ -336,7 +336,11 @@ int skey_update_thread (void *data) { } //sleep 500us= .5ms = 0.0005 seconds // 1 / 0.0005 = 2000 hz fastest, but it's really 1/0.00052 - usleep_range(1000000,1000000); + if (DEBUGMODE) { + usleep_range(1000000,1000000); // slower when debugging + } else { + usleep_range(500,500); + } //for when the thread has to stop if (kthread_should_stop()) { break; -- cgit v1.1