home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / mach / time_stamp.h < prev    next >
Text File  |  1992-07-29  |  2KB  |  68 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1987 Carnegie-Mellon University
  4.  * All rights reserved.  The CMU software License Agreement specifies
  5.  * the terms and conditions for use and redistribution.
  6.  *
  7.  * HISTORY
  8.  *  5-Apr-87  Avadis Tevanian (avie) at Carnegie-Mellon University
  9.  *    Isolate machine dependencies - machine/time_stamp chooses a
  10.  *    TS_FORMAT, if not chosen this module defaults it to 1.  Also
  11.  *    guarded against multiple inclusion.
  12.  *
  13.  * 30-Mar-87  David Black (dlb) at Carnegie-Mellon University
  14.  *    Created.
  15.  *
  16.  **********************************************************************
  17.  */ 
  18.  
  19. #ifndef    _MACH_TIME_STAMP_
  20. #define _MACH_TIME_STAMP_
  21.  
  22. #import <mach/machine/kern_return.h>
  23. #import <mach/machine/time_stamp.h>
  24. /*
  25.  *    time_stamp.h -- definitions for low-overhead timestamps.
  26.  */
  27.  
  28. struct tsval {
  29.     unsigned    low_val;    /* least significant word */
  30.     unsigned    high_val;    /* most significant word */
  31. };
  32.  
  33. /*
  34.  *    Format definitions.
  35.  */
  36.  
  37. #ifndef    TS_FORMAT
  38. /*
  39.  *    Default case - Just return a tick count for machines that
  40.  *    don't support or haven't implemented this.  Assume 100Hz ticks.
  41.  *
  42.  *    low_val - Always 0.
  43.  *    high_val - tick count.
  44.  */
  45. #define    TS_FORMAT    1
  46.  
  47. #if    KERNEL
  48. extern unsigned ts_tick_count;
  49. #endif    KERNEL
  50. #endif    TS_FORMAT
  51.  
  52. #if    NeXT
  53. extern kern_return_t kern_timestamp(struct tsval *);
  54. #else    NeXT
  55. #if    KERNEL
  56. extern kern_return_t kern_timestamp();
  57. #endif    KERNEL
  58. #e!26    NeXT
  59.  
  60. /*
  61.  *    List of all format definitions for convert_ts_to_tv.
  62.  */
  63.  
  64. #define    TS_FORMAT_DEFAULT    1
  65. #define TS_FORMAT_MMAX        2
  66. #define TS_FORMAT_NeXT        3
  67. #endif    _MACH_TIME_STAMP_
  68.