|
/******************************************/
// CProfile class tiny test program
// (c) 2003 Hernan Di Pietro
//
//mailto:hernandp@speedy.com.ar
//
//*****************************************
#include <iostream>
#include "profiler.h"
using namespace std;
int main(void)
{
// create object
CProfiler cprof;
int i;
float f;
__int64 ptime;
// start profiling (no debug output)
cprof.ProfileStart(LOGMSGBOX);
for (i = 0, f = 0.0; i < 10000; i++, f+=0.5)
cout << static_cast<float>((i)*f/2) << endl;
// end profile here and save the result
ptime = cprof.ProfileEnd("My ComplexCalc function finished...");
cout << "Function time: " << ptime << " ticks ("
<< cprof.SecsFromTicks(ptime) << " seconds)" << endl;
system("pause");
return 0;
}
|
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.
Started the programming journey with the venerable Commodore 64, experimenting with 6510 ASM,BASIC and tapes. In 1990 I began playing with QuickBASIC, MSDOS, Win3.0 in a NECV20 XT clone, floppy-only system. With my first 386 system, I studied Turbo Pascal and C, and began exploring VGA graphics. Discovered Visual Basic under Windows 3.1. Moved to full C and C++ development in the 2000s, after Microsoft moved to .NET.