home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_01 / 2n01064a < prev    next >
Text File  |  1990-12-02  |  874b  |  44 lines

  1.  
  2. #include <dos.h>
  3. #include <time.h>
  4.  
  5. #if defined(__ZTC__)
  6.  #include <int.h>
  7.  #undef int_on
  8.  #undef int_off
  9. #elif defined(__TURBOC__)
  10.  #define int_on         enable
  11.  #define int_off        disable
  12.  #ifndef inp
  13.   #define inp           inportb
  14.  #endif
  15.  #ifndef outp
  16.   #define outp          outportb
  17.  #endif
  18. #else /* assume MSC/QC */
  19.  #include <conio.h>
  20.  #define int_on         _enable
  21.  #define int_off        _disable
  22.  #ifndef MK_FP
  23.   #define MK_FP(seg,offset) \
  24.         ((void far *)(((unsigned long)(seg)<<16) | (unsigned)(offset)))
  25.  #endif
  26. #endif
  27.  
  28. /* ANSI-equivalent declarations and prototypes */
  29.  
  30. typedef unsigned long uclock_t;
  31.  
  32. #define UCLK_TCK 1000000L /* Usec per second - replaces CLK_TCK         */
  33.  
  34. #if __cplusplus
  35.  extern "C" {
  36. #endif
  37.  
  38. uclock_t usec_clock(void);
  39. void     restart_uclock(void);
  40.  
  41. #if __cplusplus
  42.  }
  43. #endif
  44.