home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -screenplay- / otherstuff / adoomppc_src / amiga_profile.h < prev    next >
C/C++ Source or Header  |  1998-04-23  |  1KB  |  20 lines

  1. #ifdef PROFILE
  2. external int profile[32][4];
  3. #define StartProfile(n) ppctimer (profile[n]);
  4. #define EndProfile(n)                                                       \
  5. {                                                                           \
  6.   unsigned int prof_end[2];                                                 \
  7.   unsigned int prof_time;                                                   \
  8.                                                                             \
  9.   ppctimer (prof_end);                                                      \
  10.   if (prof_end[1] >= profile[n][1])                                         \
  11.     prof_time = (((prof_end[1] - profile[n][1]) << 2) / bus_MHz);           \
  12.   else                                                                      \
  13.     prof_time = (((prof_end[1] - profile[n][1]) << 2) / bus_MHz + 1000000); \
  14.   profile[n][2] += prof_time;                                               \
  15. }
  16. #else
  17. #define StartProfile(n)
  18. #define EndProfile(n)
  19. #endif
  20.