home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 4.ddi / INC / PROFILE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-16  |  1.3 KB  |  56 lines

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