C# timer (slowing down a loop)

后端 未结 4 2036
我寻月下人不归
我寻月下人不归 2020-12-19 02:58

I would like to slow down a loop so that it loops every 5 seconds.

In ActionScript, I would use a timer and a timer complete event to do this. How would I go about i

4条回答
  •  一向
    一向 (楼主)
    2020-12-19 03:45

    Don't use a loop at all. Set up a Timer object and react to its fired event. Watch out, because these events will fire on a different thread (the timer's thread from the threadpool).

提交回复
热议问题