ADVANCED

The Timer function returns an object that can be stored; allowing the timer to be started and stopped on demand.  This gives the developer more control and allows timings of partial methods instead of the entire method body.

       procedure MyProc;
       var
         locTimer: IcsxTimer;
       begin
         { Use the Timer method to get a reference to the
           timer object.  We have set the parameters to the
           following:

             aStyle = tsClockCycles (send timing in CPU  clock cycles)

             aAutoStart = False (must start timer manually)
             aAutoStop = False (must stop timer manually) }
         locTimer := CodeSiteEx.Timer(tsClockCycles, False, False);
 
         { Start the timer. }
         locTimer.StartTimer;
 
         { Code to be timed goes here... }

         { Stop the timer.  At this point, the timing will be sent to CodeSiteEx. }
         locTimer.StopTimer;
       end;