CodeBase - Program Cycles in Hertz

Return to the CodeBase listing

Category: Math / Physics

Version: 1.0

0
0

Information

Uploaded: 29th Dec 2004 13:59

Modified: 29th Dec 2004 14:08

Author:  Galiem Vaelant

Summary

This short bit of code will calculate and return the number of cycles per second your program runs at in hertz, the SI unit for cycles per second.

Full Description

This short bit of code will calculate and return the number of cycles per second your program runs at in hertz, the SI unit for cycles per second.<br /> <br /> This code will produce that value in a formatted string: PC@__Hz, where __ is the number of cycls per second. Displaying this string in your program can be useful for finding spots where your program slows down, stops, etc. Thus, this can be a great tool for performance tweaking. <br /> <br /> The average that I've seen so far for a user interface that works exactly like the Windows API is 39 to 42 Hz.<br /> <br /> Using the equations in the note below, this could be expanded to produce a full wave function representing your program's performance. If nobody else does so, I may add that at a later date.<br /> <br /> Note: Hz = Hertz = Cycles/ Second = Frequency/ Wavelength

Comments

No comments yet.