How to block a timer while processing the elapsed event?

后端 未结 5 1710
臣服心动
臣服心动 2021-02-13 09:00

I have a timer that needs to not process its elapsed event handler at the same time. But processing one Elapsed event may interfere with others. I implemented the bel

5条回答
  •  眼角桃花
    2021-02-13 09:44

    I usually stop the timer while processing it, enter a try/finally block, and resume the timer when done.

提交回复
热议问题