首页 > 其他 > 详细

手写定时器

时间:2015-06-01 00:43:33      阅读:186      评论:0      收藏:0      [点我收藏+]

 /// <summary>
        /// 关键代码
        /// </summary>
        /// <returns></returns>
        [System.Runtime.InteropServices.DllImport("kernel32.dll")]
        static extern uint GetTickCount();
        static void Delay(uint ms)
        {
            uint start = GetTickCount();
            while (GetTickCount() - start < ms)
            {
                Application.DoEvents();
            }
        }

手写定时器

原文:http://www.cnblogs.com/aaaaq/p/4542919.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!