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

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: 
1.1.1.2   root       27: #define FD_SETSIZE             (8*sizeof(fd_set))
1.1       root       28: #define FD_SET(fd,fdsetp)      (*(fdsetp) |= (1 << (fd)))
                     29: #define FD_CLR(fd,fdsetp)      (*(fdsetp) &= ~(1 << (fd)))
                     30: #define FD_ISSET(fd,fdsetp)    ((*(fdsetp) >> fd) & 1)
                     31: #define FD_ZERO(fdsetp)                (*(fdsetp) = 0)
                     32: 
                     33: /*
                     34:  * Operations on timevals.
                     35:  *
                     36:  * NB: timercmp does not work for >= or <=.
                     37:  */
                     38: #define        timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)
                     39: #define        timercmp(tvp, uvp, cmp) \
                     40:        ((tvp)->tv_sec cmp (uvp)->tv_sec || \
                     41:         (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
                     42: #define        timerclear(tvp)         ((tvp)->tv_sec = (tvp)->tv_usec = 0)
                     43: 
                     44: /*
                     45:  * Names of the interval timers, and structure
                     46:  * defining a timer setting.
                     47:  */
                     48: #define        ITIMER_REAL     0
                     49: #define        ITIMER_VIRTUAL  1
                     50: #define        ITIMER_PROF     2
                     51: 
                     52: struct itimerval {
                     53:        struct  timeval it_interval;    /* timer interval */
                     54:        struct  timeval it_value;       /* current value */
                     55: };
                     56: 
1.1.1.3 ! root       57: int getitimer(int which, struct itimerval *value);
        !            58: int setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
        !            59: 
1.1       root       60: #include <time.h>
                     61: #include <sys/types.h>
                     62: 
                     63: int gettimeofday(struct timeval * tp, struct timezone * tz);
                     64: int select(int width, fd_set * readfds, fd_set * writefds,
                     65:        fd_set * exceptfds, struct timeval * timeout);
                     66: 
                     67: #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.