blob: 596ec5730dfaba5426a413f1ec1b0e81489a1d24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/*
* $Id$
*/
#include <sys/types.h>
#ifndef __POSIX_SYS_TIME_h
#define __POSIX_SYS_TIME_h
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get the CPU dependent types for clock_t and time_t
*
* NOTE: These must be visible by including <time.h>.
*/
/* Get _CLOCK_T_ and _TIME_T_. */
#include <machine/types.h>
#ifndef __clock_t_defined
typedef _CLOCK_T_ clock_t;
#define __clock_t_defined
#endif
#ifndef __time_t_defined
typedef _TIME_T_ time_t;
#define __time_t_defined
#endif
/*
* 14.1.1 Time Value Specification Structures, P1003.1b-1993, p. 261
*/
struct timespec {
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
struct itimerspec {
struct timespec it_interval; /* Timer period */
struct timespec it_value; /* Timer expiration */
};
/* XXX should really be ifdef'ed */
/*
* BSD based stuff
*/
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
struct timeval {
int tv_sec;
int tv_usec;
};
int gettimeofday(
struct timeval *tp,
struct timezone *tzp
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include */
|