110,533
社区成员
发帖
与我相关
我的任务
分享
protected override void OnStart(string[] args)
{
if(timer==null )
timer = new Timer(work, null, 30000, 30000);
// TODO: 在此处添加代码以启动服务。
}
public void work(object status)
{
lock (this)
{
//收信息
idll.geter(code);
}
}
lock (this)
{
timer.Stop();
//收信息
idll.geter(code);
timer.Start();
}