System.Diagnostics.Stopwatch 사용
Program.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test
{
class Program
{
static void Main(string[] args)
{
System.Diagnostics.Stopwatch sw = new Stopwatch();
sw.Reset(); // 초기화
sw.Start(); // 시작
/************************************************************************/
/* 시간측정 구문 */
/************************************************************************/
sw.Stop(); // 종료
Console.WriteLine("수행 시간 : {0}", sw.ElapsedMilliseconds / 1000.0F);
}
}
}
'프로그래밍 > .NET' 카테고리의 다른 글
| [C#]IP 주소 얻기 (0) | 2013.05.14 |
|---|---|
| [C#]string -> DateTime (0) | 2013.05.08 |
| [ASP.NET]FindControl not working in content page (0) | 2013.04.06 |
| [C#]IEnumerable, IEnumerator (0) | 2013.02.23 |
| [C#]string to HtmlDocument (Html Agility Pack) (0) | 2013.02.20 |