8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libbc / inc / include / sys / time.h
bloba79fb2df9f2d2a46d1f9cbb8c0701484ae1e6365
1 #pragma ident "%Z%%M% %I% %E% SMI"
3 /*
4 * Copyright (c) 1982, 1986 Regents of the University of California.
5 * All rights reserved. The Berkeley software License Agreement
6 * specifies the terms and conditions for redistribution.
7 */
9 #ifndef _sys_time_h
10 #define _sys_time_h
13 * Structure returned by gettimeofday(2) system call,
14 * and used in other calls.
16 struct timeval {
17 long tv_sec; /* seconds */
18 long tv_usec; /* and microseconds */
21 struct timezone {
22 int tz_minuteswest; /* minutes west of Greenwich */
23 int tz_dsttime; /* type of dst correction */
25 #define DST_NONE 0 /* not on dst */
26 #define DST_USA 1 /* USA style dst */
27 #define DST_AUST 2 /* Australian style dst */
28 #define DST_WET 3 /* Western European dst */
29 #define DST_MET 4 /* Middle European dst */
30 #define DST_EET 5 /* Eastern European dst */
31 #define DST_CAN 6 /* Canada */
32 #define DST_GB 7 /* Great Britain and Eire */
33 #define DST_RUM 8 /* Rumania */
34 #define DST_TUR 9 /* Turkey */
35 #define DST_AUSTALT 10 /* Australian style with shift in 1986 */
38 * Operations on timevals.
40 * NB: timercmp does not work for >= or <=.
42 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
43 #define timercmp(tvp, uvp, cmp) \
44 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
45 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
46 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
49 * Names of the interval timers, and structure
50 * defining a timer setting.
52 #define ITIMER_REAL 0
53 #define ITIMER_VIRTUAL 1
54 #define ITIMER_PROF 2
56 struct itimerval {
57 struct timeval it_interval; /* timer interval */
58 struct timeval it_value; /* current value */
61 #ifndef KERNEL
62 #include <time.h>
63 #endif
65 #endif /*!_sys_time_h*/