home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / devices / timer.h < prev    next >
C/C++ Source or Header  |  1996-08-15  |  1KB  |  53 lines

  1. #ifndef DEVICES_TIMER_H
  2. #define DEVICES_TIMER_H 1
  3. /*
  4. **    $VER: timer.h 36.16 (25.1.91)
  5. **    Includes Release 40.15
  6. **
  7. **    Timer device name and useful definitions.
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/io.h>
  15.  
  16. /* unit defintions */
  17. #define UNIT_MICROHZ    0
  18. #define UNIT_VBLANK    1
  19. #define UNIT_ECLOCK    2
  20. #define UNIT_WAITUNTIL    3
  21. #define    UNIT_WAITECLOCK    4
  22.  
  23. #define TIMERNAME    "timer.device"
  24.  
  25. #ifndef _SYS_TIME_H_
  26. /* Use whatever was included first, standard (<sys/time.h>) or
  27.    Amiga (<devices/timer.h>) includes. */
  28. struct timeval {
  29.     ULONG tv_secs;
  30.     ULONG tv_micro;
  31. };
  32. #else
  33. #define tv_secs tv_sec
  34. #define tv_micro tv_usec
  35. #endif
  36.  
  37. struct EClockVal {
  38.     ULONG ev_hi;
  39.     ULONG ev_lo;
  40. };
  41.  
  42. struct timerequest {
  43.     struct IORequest tr_node;
  44.     struct timeval tr_time;
  45. };
  46.  
  47. /* IO_COMMAND to use for adding a timer */
  48. #define TR_ADDREQUEST    CMD_NONSTD
  49. #define TR_GETSYSTIME    (CMD_NONSTD+1)
  50. #define TR_SETSYSTIME    (CMD_NONSTD+2)
  51.  
  52. #endif /* DEVICES_TIMER_H */
  53.