// This program illustrates using MHtimer functions #include "mh_timer.h" // include Maria's timer functions #include using std::cout; MHtimer mhStart; // start of timer MHtimer mhEnd; // end of timer ClockTicks mhSecs; // period b/w start and end int main() { MHzero_timer( mhStart ); // initialize start timer MHzero_timer( mhEnd ); // initialize end timer MHnow( mhStart ); // record current time in variable // mhStart for( int i = 0; i < 100000000; i ++ ) int k = k*100; MHnow( mhEnd ); // record current time in variable // mhEnd // measure period (time between start and end of timer mhSecs = ( MHseconds( mhEnd ) - MHseconds( mhStart )); // print out results cout << "for loop took: " << mhSecs << " seconds" << endl; return 0; } // end main