基于服务器的计时器工作。 [英] Server-based timers working.

查看:149
本文介绍了基于服务器的计时器工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


谁能告诉我.net中基于服务器的计时器是如何工作的?


哪一个是system.timers .timer,system.threading.timer

更适合在windows服务中使用。


工作线程调用如何经过事件。它取决于任何系统

因素吗?


如果有人可以对它有所了解那么它将真正有利于

me。


提前感谢。

Hi all,

can anyone tell me how server based timer in .net works?

Which one of either system.timers.timer, system.threading.timer is
better for use in windows service.

How worker thread call elapsed event. Will it depend on any of system
factors?

If anyone can shed some light on it then it will really benefical for
me.

thanks in advance.

推荐答案

System.Timers.Timer t = new System.Timers.Timer();

t.Elapsed + = new System.Timers.ElapsedEventHandler(Timer_Elapsed);

t.Interval = 2000;

t.Enabled = true;


试试这个

System.Timers.Timer t = new System.Timers.Timer();
t.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
t.Interval = 2000;
t.Enabled = true;

try out this




感谢您的回复。


我正在做同样的事情。它说工作正常7-8天和

突然间,timer_slaped没有被提升。


你能告诉我背后的原因吗。


提前感谢。


pappu写道:
Hi,

Thanks for your reply.

I am doing same thing. It is working properly for say 7-8 days and
suddently timer_slaped is not getting raised.

can you tell me reason behind this.

thanks in advance.

pappu wrote:

System.Timers.Timer t = new System.Timers.Timer();

t.Elapsed + = new System.Timers.ElapsedEventHandler(Timer_Elapsed);

t.Interval = 2000;

t.Enabled = true;


试试这个
System.Timers.Timer t = new System.Timers.Timer();
t.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
t.Interval = 2000;
t.Enabled = true;

try out this


很抱歉说但是很好现在..........


如果你不介意我可以一个人


你好朋友可以任何身体告诉我如何在网上编辑图像

应用程序。谢谢,萨钦。

Sorry to say but Well buzy right now ..........

if u dun mind can me one ans

Hello friends can any body tell me how to redact image in web
application. thanks, Sachin.


这篇关于基于服务器的计时器工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆