home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / sys / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  2.3 KB  |  75 lines

  1. #ifndef _SYS_TIME_H
  2. #define _SYS_TIME_H
  3.  
  4. #include <features.h>
  5. #include <linux/types.h>
  6. #include <linux/time.h>
  7.  
  8. #define    DST_NONE    0    /* not on dst */
  9. #define    DST_USA        1    /* USA style dst */
  10. #define    DST_AUST    2    /* Australian style dst */
  11. #define    DST_WET        3    /* Western European dst */
  12. #define    DST_MET        4    /* Middle European dst */
  13. #define    DST_EET        5    /* Eastern European dst */
  14. #define    DST_CAN        6    /* Canada */
  15. #define    DST_GB        7    /* Great Britain and Eire */
  16. #define    DST_RUM        8    /* Rumania */
  17. #define    DST_TUR        9    /* Turkey */
  18. #define    DST_AUSTALT    10    /* Australian style with shift in 1986 */
  19.  
  20. /*
  21.  * Operations on timevals.
  22.  *
  23.  * NB: timercmp does not work for >= or <=.
  24.  * 
  25.  */
  26. #define    timerisset(tvp)        ((tvp)->tv_sec || (tvp)->tv_usec)
  27. #define    timercmp(tvp, uvp, cmp)    \
  28.     (((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) \
  29.     || (tvp)->tv_sec cmp (uvp)->tv_sec)
  30. #define    timerclear(tvp)        ((tvp)->tv_sec = (tvp)->tv_usec = 0)
  31.  
  32. #include <time.h>
  33. #include <sys/types.h>
  34.  
  35. __BEGIN_DECLS
  36.  
  37. extern int    __gettimeofday __P ((struct timeval * __tp,
  38.             struct timezone * __tz));
  39. extern int    gettimeofday __P ((struct timeval * __tp,
  40.             struct timezone * __tz));
  41. extern int    __settimeofday __P ((__const struct timeval *__tv,
  42.             __const struct timezone *__tz));
  43. extern int    settimeofday __P ((__const struct timeval *__tv,
  44.             __const struct timezone *__tz));
  45.  
  46. extern int    __select __P ((int __width, fd_set * __readfds,
  47.             fd_set * __writefds, fd_set * __exceptfds,
  48.             struct timeval * __timeout));
  49. extern int    select __P ((int __width, fd_set * __readfds,
  50.             fd_set * __writefds, fd_set * __exceptfds,
  51.             struct timeval * __timeout));
  52.  
  53. extern int    __getitimer __P ((int __which,
  54.             struct itimerval *__value));
  55. extern int    getitimer __P ((int __which,
  56.             struct itimerval *__value));
  57. extern int    __setitimer __P ((int __which,
  58.             __const struct itimerval *__value,
  59.             struct itimerval *__ovalue));
  60. extern int    setitimer __P ((int __which,
  61.             __const struct itimerval *__value,
  62.             struct itimerval *__ovalue));
  63.  
  64. extern int    __adjtime __P ((struct timeval * __itv,
  65.             struct timeval * __otv));
  66. extern int    adjtime __P ((struct timeval * __itv,
  67.             struct timeval * __otv));
  68.  
  69. extern int    __utimes __P((char *__path, struct timeval *tvp));
  70. extern int    utimes __P((char *__path, struct timeval *tvp));
  71.  
  72. __END_DECLS
  73.  
  74. #endif /*_SYS_TIME_H*/
  75.