home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / pOSxA.lzx / pOSxA / devices / timer.h < prev   
Encoding:
C/C++ Source or Header  |  1997-03-12  |  917 b   |  46 lines

  1. #ifndef DEVICES_TIMER_H
  2. #define DEVICES_TIMER_H 1
  3.  
  4. /*******************************************************************
  5.  pOS / Amiga adapt
  6. *******************************************************************/
  7.  
  8. #ifndef EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11. #ifndef __INC_POS_DEVICE_TIMER_H
  12. #include <p:Device/Timer.h>
  13. #endif
  14. #include <exec/io.h>
  15.  
  16.  
  17. #define UNIT_MICROHZ    TIMERUNIT_MicroHz
  18. #define UNIT_VBLANK    TIMERUNIT_VBlank
  19.  
  20. #ifdef __IGNORE_NOT_SUPPORTED__
  21.  #define UNIT_ECLOCK     2  /* => error */
  22.  #define UNIT_WAITUNTIL  3
  23.  #define UNIT_WAITECLOCK 4
  24. #endif /** __IGNORE_NOT_SUPPORTED__ **/
  25.  
  26.  
  27. #define TIMERNAME "ptimer.device"
  28.  
  29. struct timeval
  30. {
  31.   ULONG tv_secs;
  32.   ULONG tv_micro;
  33. };
  34.  
  35. struct timerequest
  36. {
  37.   struct IORequest tr_node;
  38.   struct timeval tr_time;
  39. };
  40.  
  41. #define TR_ADDREQUEST    TRCMD_AddRequest
  42. #define TR_GETSYSTIME    TRCMD_GetSysTime
  43. #define TR_SETSYSTIME    TRCMD_SetSysTime
  44.  
  45. #endif /* DEVICES_TIMER_H */
  46.