Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hello,
There in lies the problem. With a very slow machine even 500 ms wasn't enough. I was still getting duplicate events. I couldn't reproduce that until I set the interval to 1 ms.
The disable is the first line of code. I moved the logging for the disabled timer to after that line of code.
I even wrapped the loop in a try finally. It still queues up the events.
>Hi,
>
>>
>I was hoping that would work. Same result. The timer event fires 10 times and then cycles through the loop.
>>
>
>Were you disabling the timer immediately in the timer event itself ?
>To be honest I'd no idea whether it would help or not - but seemed worth a try.
>
>IAC binding to the event is going to introduce some processing between the timer event actually firing and the first opportunity you get to disable it. If the duration of that processing is greater than the timer interval then I can see no solution (if you use binding). Do you really need such a short timer interval (I think the minimum true resolution is about 55ms anyway)?
>
>Regards,
>Viv
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement