Usermode/libposix - Header wrapping, mktemp
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / sys / time.h
1 /*
2  * Acess2 POSIX Emulation
3  * - By John Hodge (thePowersGang)
4  *
5  * sys/time.h
6  * - Timing calls
7  */
8 #ifndef _LIBPOSIX__SYS__TIME_H_
9 #define _LIBPOSIX__SYS__TIME_H_
10
11 #include <time.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 typedef unsigned long   suseconds_t;
18
19 struct timeval
20 {
21         time_t  tv_sec;
22         suseconds_t     tv_usec;
23 };
24
25 // struct timezone . tz_dsttime
26 enum
27 {
28         DST_NONE,       // No DST
29         DST_USA,        // USA style DST
30         DST_AUST,       // Australian style DST
31         DST_WET,        // Western European DST
32         DST_MET,        // Middle European DST
33         DST_EET,        // Eastern European DST
34         DST_CAN,        // Canada
35         DST_GB,         // Great Britain and Eire
36         DST_RUM,        // Rumania
37         DST_TUR,        // Turkey
38         DST_AUSTALT,    // Australia with 1986 shift
39 };
40
41 struct timezone
42 {
43         int tz_minuteswest;
44         int tz_dsttime;
45 };
46
47 struct itimerval
48 {
49         struct timeval  it_interval;
50         struct timeval  it_value;
51 };
52
53 // TODO: This should also define fd_set and select()
54
55 extern int      getitimer(int which, struct itimerval *current_value);
56 extern int      setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value);
57 extern int      gettimeofday(struct timeval *tv, struct timezone *tz);
58 // extern int   settimeofday(const struct timeval *tv, const struct timezone *tz); //ifdef _BSD_SOURCE
59 // select
60 extern int      utimes(const char *, const struct timeval [2]);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif
67

UCC git Repository :: git.ucc.asn.au