Click here to Skip to main content
12,560,241 members (58,823 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads


131 bookmarked

High-Performance Timer in C#

, 29 Jul 2002 CPOL
A C# class to provide exact time measurement in your applications.
using System;
using Win32;

namespace HighPerformanceTimer
	/// <summary>
	/// Zusammendfassende Beschreibung f�r Class1.
	/// </summary>
	class Class1
		/// <summary>
		/// Der Haupteinstiegspunkt f�r die Anwendung.
		/// </summary>
		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


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.


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


About the Author

Daniel Strigl
Austria Austria
No Biography provided

You may also be interested in...

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