.NET, event every minute (on the minute). Is a timer the best option?

后端 未结 14 2258
-上瘾入骨i
-上瘾入骨i 2020-11-27 03:02

I want to do stuff every minute on the minute (by the clock) in a windows forms app using c#. I\'m just wondering whats the best way to go about it ?

I could use a t

14条回答
  •  情话喂你
    2020-11-27 03:56

    Use a timer set to run every second (or millisecond, whatever your accuracy threshold is), and then code the method to run your functionality if and only if the current time is within that threshold past the "on the minute" point.

提交回复
热议问题