Usermode/libposix - Implimenting functions for dropbear
[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 typedef unsigned long   suseconds_t;
14
15 struct timeval
16 {
17         time_t  tv_sec;
18         suseconds_t     tv_usec;
19 };
20
21 // struct timezone . tz_dsttime
22 enum
23 {
24         DST_NONE,       // No DST
25         DST_USA,        // USA style DST
26         DST_AUST,       // Australian style DST
27         DST_WET,        // Western European DST
28         DST_MET,        // Middle European DST
29         DST_EET,        // Eastern European DST
30         DST_CAN,        // Canada
31         DST_GB,         // Great Britain and Eire
32         DST_RUM,        // Rumania
33         DST_TUR,        // Turkey
34         DST_AUSTALT,    // Australia with 1986 shift
35 };
36
37 struct timezone
38 {
39         int tz_minuteswest;
40         int tz_dsttime;
41 };
42
43 struct itimerval
44 {
45         struct timeval  it_interval;
46         struct timeval  it_value;
47 };
48
49 // TODO: This should also define fd_set and select()
50
51 extern int      getitimer(int which, struct itimerval *current_value);
52 extern int      setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value);
53 extern int      gettimeofday(struct timeval *tv, struct timezone *tz);
54 // extern int   settimeofday(const struct timeval *tv, const struct timezone *tz); //ifdef _BSD_SOURCE
55 // select
56 extern int      utimes(const char *, const struct timeval [2]);
57
58 #endif
59

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