How to call a method after so many seconds?

后端 未结 5 846
太阳男子
太阳男子 2020-12-06 22:31

In my project I would like to be able to call a method after 3 minutes have passed. There is no \"main loop\" to speak of so I cannot use a stopwatch and constantly check if

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-06 23:23

    if you have hundreds or thousand of those timers, some scheduling will do the job.

    You really should investigate quartznet

    lots of concurrent timers perform not very well as i experienced, quartznet will do.

    and if you really want to have those scheduling tasks in your application, perhaps this article gives you some ideas Task Scheduler Class Library for .NET

提交回复
热议问题