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
35 long tv_sec; /* seconds */
36 long tv_usec; /* and microseconds */
38 #endif /* __DECC_VER */
42 * Operations on timevals.
44 * NB: timercmp does not work for >= or <=.
46 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
47 #define timercmp(tvp, uvp, cmp) \
48 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
49 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
50 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
53 * Names of the interval timers, and structure
54 * defining a timer setting.
57 #define ITIMER_VIRTUAL 1
63 struct timeval it_interval; /* timer interval */
64 struct timeval it_value; /* current value */
67 #if __DECC_VER < 50200000
70 struct timeval it_interval; /* timer interval */
71 struct timeval it_value; /* current value */
73 #endif /* __DECC_VER */
84 #endif /*!_VMS_GTOD_*/