Click here to Skip to main content
11,417,219 members (56,148 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
Add your own
alternative version

High-Performance Timer in C#

, 29 Jul 2002 CPOL
A C# class to provide exact time measurement in your applications.
highperformancetimersource.zip
App.ico
HighPerformanceTimer.csproj.user
using System;
using Win32;

namespace HighPerformanceTimer
{
	/// <summary>
	/// Zusammendfassende Beschreibung f�r Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// Der Haupteinstiegspunkt f�r die Anwendung.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			//
			// TODO: F�gen Sie hier Code hinzu, um die Anwendung zu starten
			//
            HiPerfTimer pt = new HiPerfTimer();                    // create a new PerfTimer object
            pt.Start();                                            // start the timer
            Console.WriteLine("Test\n");                           // the code to be timed
            pt.Stop();                                             // stop the timer
            Console.WriteLine("Duration: {0} sec\n", pt.Duration); // print the duration of the timed code

            Console.ReadLine();
		}
	}
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Daniel Strigl

Austria Austria
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.4 | Last Updated 30 Jul 2002
Article Copyright 2002 by Daniel Strigl
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid