You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
589 B
C#

/*
* C# Program to Create Stop Watch
*/
using System;
using System.Diagnostics;
using System.Threading;
class Program
{
static void Main()
{
// Create new stopwatch
Stopwatch stopwatch = new Stopwatch();
// Begin timing
stopwatch.Start();
for (int i = 0; i < 10; i++)
{
Console.WriteLine("HI");
}
// Stop timing
stopwatch.Stop();
Console.WriteLine("Time Elapsed : {0}",
stopwatch.Elapsed);
Console.ReadLine();
}
}