定时timer

复制代码
       this.aTimer = new System.Timers.Timer();
        // 
        // aTimer
        // 
        this.aTimer.AutoReset = false;//是否重复执行
        this.aTimer.Interval = 300;//设定时间
        this.aTimer.SynchronizingObject = this;
        this.aTimer.Enabled=true;是否执行事件
        this.aTimer.Elapsed += new ElapsedEventHandler(CheckUpdatetimer_Elapsed);//触发事件
        this.aTimer.Start();//开始计时
复制代码

 

posted @   一招致命九虎山  阅读(2)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
点击右上角即可分享
微信分享提示