标签:time call oid private pre bsp obj 计时器 开始
GLog.WLog("_thdTimer before"); _thdTimer = new System.Threading.Timer(new TimerCallback(TimerProc)); //2秒后开始执行计时器;每3秒执行一次 _thdTimer.Change(2000,3000); GLog.WLog("_thdTimer after"); private void TimerProc(object state) { try { GLog.WLog("threading timer tick"); } catch (Exception ex) { } }
2017-04-24 00:20:34.821 _thdTimer before
2017-04-24 00:20:34.821 _thdTimer after
2017-04-24 00:20:36.827 threading timer tick
2017-04-24 00:20:39.839 threading timer tick
2017-04-24 00:20:42.849 threading timer tick
2017-04-24 00:20:45.861 threading timer tick
2017-04-24 00:20:48.871 threading timer tick
2017-04-24 00:20:51.880 threading timer tick
标签:time call oid private pre bsp obj 计时器 开始
原文地址:http://www.cnblogs.com/runliuv/p/6754807.html