Annotation of linux/include/sys/time.h, revision 1.1.1.1

1.1       root        1: #ifndef _SYS_TIME_H
                      2: #define _SYS_TIME_H
                      3: 
                      4: /* gettimofday returns this */
                      5: struct timeval {
                      6:        long    tv_sec;         /* seconds */
                      7:        long    tv_usec;        /* microseconds */
                      8: };
                      9: 
                     10: struct timezone {
                     11:        int     tz_minuteswest; /* minutes west of Greenwich */
                     12:        int     tz_dsttime;     /* type of dst correction */
                     13: };
                     14: 
                     15: #define        DST_NONE        0       /* not on dst */
                     16: #define        DST_USA         1       /* USA style dst */
                     17: #define        DST_AUST        2       /* Australian style dst */
                     18: #define        DST_WET         3       /* Western European dst */
                     19: #define        DST_MET         4       /* Middle European dst */
                     20: #define        DST_EET         5       /* Eastern European dst */
                     21: #define        DST_CAN         6       /* Canada */
                     22: #define        DST_GB          7       /* Great Britain and Eire */
                     23: #define        DST_RUM         8       /* Rumania */
                     24: #define        DST_TUR         9       /* Turkey */
                     25: #define        DST_AUSTALT     10      /* Australian style with shift in 1986 */
                     26: 
                     27: #define FD_SET(fd,fdsetp)      (*(fdsetp) |= (1 << (fd)))
                     28: #define FD_CLR(fd,fdsetp)      (*(fdsetp) &= ~(1 << (fd)))
                     29: #define FD_ISSET(fd,fdsetp)    ((*(fdsetp) >> fd) & 1)
                     30: #define FD_ZERO(fdsetp)                (*(fdsetp) = 0)
                     31: 
                     32: /*
                     33:  * Operations on timevals.
                     34:  *
                     35:  * NB: timercmp does not work for >= or <=.
                     36:  */
                     37: #define        timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)
                     38: #define        timercmp(tvp, uvp, cmp) \
                     39:        ((tvp)->tv_sec cmp (uvp)->tv_sec || \
                     40:         (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
                     41: #define        timerclear(tvp)         ((tvp)->tv_sec = (tvp)->tv_usec = 0)
                     42: 
                     43: /*
                     44:  * Names of the interval timers, and structure
                     45:  * defining a timer setting.
                     46:  */
                     47: #define        ITIMER_REAL     0
                     48: #define        ITIMER_VIRTUAL  1
                     49: #define        ITIMER_PROF     2
                     50: 
                     51: struct itimerval {
                     52:        struct  timeval it_interval;    /* timer interval */
                     53:        struct  timeval it_value;       /* current value */
                     54: };
                     55: 
                     56: #include <time.h>
                     57: #include <sys/types.h>
                     58: 
                     59: int gettimeofday(struct timeval * tp, struct timezone * tz);
                     60: int select(int width, fd_set * readfds, fd_set * writefds,
                     61:        fd_set * exceptfds, struct timeval * timeout);
                     62: 
                     63: #endif /*_SYS_TIME_H*/

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.