본문 바로가기
c#

Delay

by [김경민]™ ┌(  ̄∇ ̄)┘™ 2013. 4. 27.
728x90


        public static void Delay(Single DelayInMilliseconds)
        {

            DateTime STime = DateTime.Now;

            TimeSpan span;

            do
            {
                Application.DoEvents();

                System.Threading.Thread.Sleep(2);

                span = DateTime.Now - STime;

            } while (span.TotalMilliseconds < DelayInMilliseconds);

        }

 

728x90

'c#' 카테고리의 다른 글

zedgraph  (0) 2013.04.27
EventType clr20r3 P9 system.io.fileloadexception  (0) 2013.04.27
윈도우 서비스 등록  (0) 2013.04.27
메모리 사용량 체크  (0) 2013.04.27
현재 프로세스 , 메모리 총사용량  (0) 2013.04.27

댓글