With AX, the application provides profiling routines for determining the CPU load. These routines are used with AX and AUX effect operations and with the user's callback routines. To use a profiling routine, follow the procedure shown below.
AXInitProfile function to initialize runtime profiling of AX and its child callbacks.
AXGetProfile function periodically to retrieve all profiles recorded by AX since the last call to the AXGetProfile function.
The following is sample code for profiling.
#include <revolution.h> ... // Initialize AX #define MAX_PROFILES 256 AXPROFILE profile[MAX_PROFILES]; AXInitProfile(&profile, MAX_PROFILES); ... // somewhere in the game loop int i; i = AXGetProfile(); // retrieve all profiles since last call to AXGetProfile() while (i) { // look at profile[i] i--; }
2007/10/02 Revised the entire document after changes to the structure of function reference.
2006/03/01 Initial version.
CONFIDENTIAL