Count the number of mouse clicks in one second
Hi I'm working on an application that I want to improve the performance.(I
know the question is kinda lengthy one- I apologize.)
I will explain in detail its a bidding application that uses only
qtscript/qscript(kinda javascript) and no html.
When a user click on a Button, I want to point to a text field(For a
normal user its okay like -1 or 2 clicks per second). But the user crazily
click on button(5 -10 clicks per second - yeah some people click like
that), it decreases the performance like the amount take delay to display
because every click it points to focus on text field.
I'm thinking of some work around like if the user clicks more than 3 times
in 1 second we call the focus function only after the last click- I don't
know this is a right solution if you guys know anything better please
suggest. Another problem is I can't use setInterval() and clearInterval().
Any help would be greatly appreciated.
No comments:
Post a Comment