1 /* @(#)time.h 2.9 87/01/17 SMI; from UCB 7.1 6/4/86 */
4 Definitions of various structures used on UNIX for
9 * Copyright (c) 1982, 1986 Regents of the University of California.
10 * All rights reserved. The Berkeley software License Agreement
11 * specifies the terms and conditions for redistribution.
22 * Structure returned by gettimeofday(2) system call,
23 * and used in other calls.
28 long tv_sec; /* seconds */
29 long tv_usec; /* and microseconds */
32 #if (__DECC_VER < 50200000) && (__VMS_VER < 70000000)
35 long tv_sec; /* seconds */
36 long tv_usec; /* and microseconds */
38 #endif /* __DECC_VER */
42 int tz_minuteswest; /* minutes west of Greenwich */
43 int tz_dsttime; /* type of dst correction */
46 #define DST_NONE 0 /* not on dst */
47 #define DST_USA 1 /* USA style dst */
48 #define DST_AUST 2 /* Australian style dst */
49 #define DST_WET 3 /* Western European dst */
50 #define DST_MET 4 /* Middle European dst */
51 #define DST_EET 5 /* Eastern European dst */
52 #define DST_CAN 6 /* Canada */
53 #define DST_GB 7 /* Great Britain and Eire */
54 #define DST_RUM 8 /* Rumania */
55 #define DST_TUR 9 /* Turkey */
56 #define DST_AUSTALT 10 /* Australian style with shift in 1986 */
59 * Operations on timevals.
61 * NB: timercmp does not work for >= or <=.
63 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
64 #define timercmp(tvp, uvp, cmp) \
65 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
66 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
67 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
70 * Names of the interval timers, and structure
71 * defining a timer setting.
74 #define ITIMER_VIRTUAL 1
80 struct timeval it_interval; /* timer interval */
81 struct timeval it_value; /* current value */
84 #if (__DECC_VER < 50200000) && (__VMS_VER < 70000000)
87 struct timeval it_interval; /* timer interval */
88 struct timeval it_value; /* current value */
90 #endif /* __DECC_VER */
101 #endif /*!_UNIX_TIME_*/