You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I need to detect when data stops entering for at least X ms. For example, when data is entering, if, for example, 300 ms passed between two lines, a function is launched. Can this jeopardize the perofmrnance a lot?
Thank you very much for your answer(s)
The text was updated successfully, but these errors were encountered:
keep track of the last time a handler was called (assuming you catch all incoming events) and update that time in each handler as well as check for the duration you want.
start a timer that you'd cancel/restart on each handler, there are many ways to do that depending on the way you run your program (sched-based, signal.alarm based, threading.Timer based etc, read through those and pick the one you want)
Neither option should really be costing much, just make sure you're not blocking (never call time.sleep).
Hi! I need to detect when data stops entering for at least X ms. For example, when data is entering, if, for example, 300 ms passed between two lines, a function is launched. Can this jeopardize the perofmrnance a lot?
Thank you very much for your answer(s)
The text was updated successfully, but these errors were encountered: