|
using System;
namespace Stopwatch_Demo
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Stopwatch_Test
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Performance.Stopwatch sw = new Performance.Stopwatch();
sw.Start();
for(int i=0; i<10; i++)
{
System.Threading.Thread.Sleep(100);
Console.Write("Split time: ");
Console.Write(sw.GetSplitTimeInMicroseconds().ToString());
Console.WriteLine(" microseconds.");
}
sw.Stop();
Console.Write("Total process time: ");
Console.Write(sw.GetElapsedTimeSpan().ToString());
Console.WriteLine(".");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.