반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
private static DateTime Delay(int MS)
{
   DateTime ThisMoment = DateTime.Now;
   TimeSpan duration = new TimeSpan(0000, MS);
   DateTime AfterWards = ThisMoment.Add(duration);
 
   while (AfterWards >= ThisMoment)
   {
       System.Windows.Forms.Application.DoEvents();
       ThisMoment = DateTime.Now;
   }
 
   return DateTime.Now;
}
cs


1
System.Threading.Thread.Sleep(자연수);
cs


반응형

'개발모듈 > Visual Studio 2010 - C#' 카테고리의 다른 글

- 상수선언  (0) 2019.02.27
- 이벤트 함수호출  (0) 2019.01.02
- 시리얼통신 (수신처리)  (0) 2018.12.24
- Control Mouse Event  (0) 2018.12.12
- 날짜, 시간 가져오기  (0) 2018.12.05
Posted by 메가아재
,