home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 6.ddi / MWHC.006 / Q < prev    next >
Encoding:
Text File  |  1992-12-09  |  1.4 KB  |  51 lines

  1. /*   profile.h -- extra-ANSI 
  2.  *
  3.  *   Profiler routines.
  4.  *      Copyright (c) 1990, MetaWare Incorporated
  5.  */
  6. #ifndef _PROFILE_H
  7. #define _PROFILE_H
  8.  
  9. #ifdef __CPLUSPLUS__
  10. extern "C" {
  11. #endif
  12.  
  13. /* Call to start the profiler. The profiler starts profiling as soon
  14.  * as the function returns.
  15.  */
  16. void _profile_start(char *argv0, char *mapfile, char *monfile, int minutes, int times);
  17.  
  18. /* Call to stop the profiler. Usually called by the "atexit" function. */
  19. void _profile_end();
  20.  
  21. /* Call to temporarily suspend profiling. */
  22. void _profile_suspend();
  23.  
  24. /* Call to restart profiling after it has been suspended. */
  25. void _profile_restart();
  26.  
  27. /* Default profiler setup. Easy interface to call to start and automatically
  28.  * stop the profiler at exit. This function will call the above two.
  29.  */
  30. void _profile_setup(int argc, char **argv);
  31.  
  32. /*   The default number of minutes to run. */
  33. #define _DEFAULT_MINUTES        5
  34.  
  35. /*   The default frequency. */
  36. /*   As close to 500 as is possible. */
  37. #define _DEFAULT_TIMES          504
  38.  
  39. /*  _profile_minutes is the number of minutes the profiler will run.
  40.  *  _profile_times is the frequency in samples per second.
  41.  *  _profile_on is a flag that is set to TRUE (1) if the profiler is active.
  42.  */
  43. extern int _profile_minutes,
  44.            _profile_times,
  45.            _profile_on;
  46.  
  47. #ifdef __CPLUSPLUS__
  48. }
  49. #endif
  50. #endif /* _PROFILE_H */
  51.