Show More
@@ -147,10 +147,16 b' def inputhook_wx3():' | |||||
147 | # 0.005 3% |
|
147 | # 0.005 3% | |
148 | # 0.01 1.5% |
|
148 | # 0.01 1.5% | |
149 | # 0.05 0.5% |
|
149 | # 0.05 0.5% | |
150 |
|
|
150 | used_time = clock() - t | |
|
151 | if used_time > 5*60.0: | |||
|
152 | # print 'Sleep for 5 s' # dbg | |||
|
153 | time.sleep(5.0) | |||
|
154 | elif used_time > 10.0: | |||
|
155 | # print 'Sleep for 1 s' # dbg | |||
151 | time.sleep(1.0) |
|
156 | time.sleep(1.0) | |
152 |
if |
|
157 | elif used_time > 0.1: | |
153 | # Few GUI events coming in, so we can sleep longer |
|
158 | # Few GUI events coming in, so we can sleep longer | |
|
159 | # print 'Sleep for 0.05 s' # dbg | |||
154 | time.sleep(0.05) |
|
160 | time.sleep(0.05) | |
155 | else: |
|
161 | else: | |
156 | # Many GUI events coming in, so sleep only very little |
|
162 | # Many GUI events coming in, so sleep only very little | |
@@ -159,4 +165,4 b' def inputhook_wx3():' | |||||
159 | return 0 |
|
165 | return 0 | |
160 |
|
166 | |||
161 | # This is our default implementation |
|
167 | # This is our default implementation | |
162 | inputhook_wx = inputhook_wx3 No newline at end of file |
|
168 | inputhook_wx = inputhook_wx3 |
General Comments 0
You need to be logged in to leave comments.
Login now