Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
time.h File Reference
#include <time.h>
#include <sys/types.h>
#include <sys/cdefs.h>

Go to the source code of this file.

Classes

struct  timeval
struct  timespec
struct  timezone
struct  itimerval
struct  clockinfo
struct  fd_set

Defines

#define TIMEVAL_TO_TIMESPEC(tv, ts)
#define TIMESPEC_TO_TIMEVAL(tv, ts)
#define DST_NONE   0 /* not on dst */
#define DST_USA   1 /* USA style dst */
#define DST_AUST   2 /* Australian style dst */
#define DST_WET   3 /* Western European dst */
#define DST_MET   4 /* Middle European dst */
#define DST_EET   5 /* Eastern European dst */
#define DST_CAN   6 /* Canada */
#define timerclear(tvp)   (tvp)->tv_sec = (tvp)->tv_usec = 0
#define timerisset(tvp)   ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp)
#define ITIMER_REAL   0
#define ITIMER_VIRTUAL   1
#define ITIMER_PROF   2
#define NBBY   8 /* number of bits in a byte */
#define FD_SETSIZE   256
#define NFDBITS   (sizeof(fd_mask) * NBBY) /* bits per mask */
#define howmany(x, y)   (((x)+((y)-1))/(y))
#define FD_SET(n, p)   ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p)   ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p)   ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_COPY(f, t)   memcpy(t, f, sizeof(*(f)))
#define FD_ZERO(p)   memset(p, 0, sizeof(*(p)))

Typedefs

typedef long fd_mask
typedef struct fd_set fd_set

Functions

__BEGIN_DECLS int getitimer __P ((int, struct itimerval *))
int gettimeofday __P ((struct timeval *, struct timezone *))
int setitimer __P ((int, const struct itimerval *, struct itimerval *))
int utimes __P ((const char *, const struct timeval *))
int select __P ((int, fd_set *, fd_set *, fd_set *, struct timeval *))

Class Documentation

struct timeval

Definition at line 47 of file time.h.

Class Members
time_t tv_sec
suseconds_t tv_usec
struct timespec

Definition at line 55 of file time.h.

Class Members
long tv_nsec
time_t tv_sec
struct timezone

Definition at line 69 of file time.h.

Collaboration diagram for timezone:
Class Members
int tz_dsttime
int tz_minuteswest
struct itimerval

Definition at line 97 of file time.h.

struct clockinfo

Definition at line 105 of file time.h.

Collaboration diagram for clockinfo:
Class Members
int hz
int profhz
int stathz
int tick
struct fd_set

Definition at line 119 of file macsocket.h.

Class Members
fd_mask fds_bits

Define Documentation

#define DST_AUST   2 /* Australian style dst */

Definition at line 75 of file time.h.

#define DST_CAN   6 /* Canada */

Definition at line 79 of file time.h.

#define DST_EET   5 /* Eastern European dst */

Definition at line 78 of file time.h.

#define DST_MET   4 /* Middle European dst */

Definition at line 77 of file time.h.

#define DST_NONE   0 /* not on dst */

Definition at line 73 of file time.h.

#define DST_USA   1 /* USA style dst */

Definition at line 74 of file time.h.

#define DST_WET   3 /* Western European dst */

Definition at line 76 of file time.h.

#define FD_CLR (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))

Definition at line 136 of file time.h.

#define FD_COPY (   f,
  t 
)    memcpy(t, f, sizeof(*(f)))

Definition at line 138 of file time.h.

#define FD_ISSET (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))

Definition at line 137 of file time.h.

#define FD_SET (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))

Definition at line 135 of file time.h.

#define FD_SETSIZE   256

Definition at line 121 of file time.h.

#define FD_ZERO (   p)    memset(p, 0, sizeof(*(p)))

Definition at line 139 of file time.h.

#define howmany (   x,
  y 
)    (((x)+((y)-1))/(y))

Definition at line 128 of file time.h.

Definition at line 95 of file time.h.

Definition at line 93 of file time.h.

Definition at line 94 of file time.h.

#define NBBY   8 /* number of bits in a byte */

Definition at line 112 of file time.h.

#define NFDBITS   (sizeof(fd_mask) * NBBY) /* bits per mask */

Definition at line 125 of file time.h.

#define timerclear (   tvp)    (tvp)->tv_sec = (tvp)->tv_usec = 0

Definition at line 82 of file time.h.

#define timercmp (   tvp,
  uvp,
  cmp 
)
Value:
(((tvp)->tv_sec == (uvp)->tv_sec) ?                            \
           ((tvp)->tv_usec cmp (uvp)->tv_usec) :               \
           ((tvp)->tv_sec cmp (uvp)->tv_sec))

Definition at line 84 of file time.h.

#define timerisset (   tvp)    ((tvp)->tv_sec || (tvp)->tv_usec)

Definition at line 83 of file time.h.

#define TIMESPEC_TO_TIMEVAL (   tv,
  ts 
)
Value:
{                                  \
       (tv)->tv_sec = (ts)->tv_sec;                                   \
       (tv)->tv_usec = (ts)->tv_nsec / 1000;                          \
}

Definition at line 64 of file time.h.

#define TIMEVAL_TO_TIMESPEC (   tv,
  ts 
)
Value:
{                                  \
       (ts)->tv_sec = (tv)->tv_sec;                                   \
       (ts)->tv_nsec = (tv)->tv_usec * 1000;                          \
}

Definition at line 60 of file time.h.


Typedef Documentation

typedef long fd_mask

Definition at line 124 of file time.h.

typedef struct fd_set fd_set

Function Documentation

__BEGIN_DECLS int getitimer __P ( (int, struct itimerval *)  )
int gettimeofday __P ( (struct timeval *, struct timezone *)  )
int setitimer __P ( (int, const struct itimerval *, struct itimerval *)  )
int utimes __P ( (const char *, const struct timeval *)  )
int select __P ( (int, fd_set *, fd_set *, fd_set *, struct timeval *)  )