summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-29 18:55:26 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-29 18:55:26 -0500
commit3dbdd1b9a99fdd46456a52401c434e0af1a326ef (patch)
tree67d468a7db4bb2401c0e594a265c531f5b4f47d5
parent51b2b830a8a5d7117c62013cd58222d5cf359b47 (diff)
made DEBUGMODE affect read periods as well
-rw-r--r--skey.c6
1 files changed, 5 insertions, 1 deletions
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;