]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
2 | ** time.h | |
3 | */ | |
4 | ||
5 | imports <stdlib> ; | |
6 | ||
7 | typedef struct timeval { | |
8 | long tv_sec; | |
9 | long tv_usec; | |
10 | } __timeval; | |
11 | ||
12 | typedef struct timezone { | |
13 | int tz_minuteswest; | |
14 | int tz_dsttime; | |
15 | } __timezone; | |
16 | ||
17 | enum { DST_NONE, DST_USA, DST_AUST, DST_WET, DST_MET, DST_EET } __timezones; | |
18 | ||
19 | | bool : int | timerisset(struct timeval tvp) { ensures true; } | |
20 | ||
21 | void timerclear(struct timeval tvp); | |
22 | ||
23 | constant int ITIMER_REAL; | |
24 | constant int ITIMER_VIRTUAL; | |
25 | constant int ITIMER_PROF; | |
26 | ||
27 | typedef struct itimerval { | |
28 | struct timeval it_interval; | |
29 | struct timeval it_value; | |
30 | } __itimerval; | |
31 | ||
32 | typedef struct tm { | |
33 | int tm_sec ; | |
34 | int tm_min ; | |
35 | int tm_hour ; | |
36 | int tm_mday ; | |
37 | int tm_mon ; | |
38 | int tm_year ; | |
39 | int tm_wday ; | |
40 | int tm_yday ; | |
41 | int tm_isdst ; | |
42 | long tm_gmtoff ; | |
43 | char *tm_zone ; | |
44 | } __tm; | |
45 | ||
46 | typedef int time_t ; | |
47 | typedef int clock_t ; | |
48 | ||
49 | constant int CLOCKS_PER_SEC ; | |
50 | ||
51 | char * asctime( struct tm *__tm ) { ensures true; } | |
52 | clock_t clock( void ) { ensures true; } | |
53 | char * ctime( time_t *__clock ); | |
54 | double difftime( time_t __time1, time_t __time0 ) { ensures true; } | |
55 | struct tm * gmtime( time_t *__clock ) { ensures true; } | |
56 | struct tm * localtime( time_t *__clock ) { ensures true; } | |
57 | time_t mktime( struct tm *__timeptr ) { ensures true; } | |
58 | size_t strftime( char *__s, size_t __maxsize, | |
59 | char *__format, struct tm *__tm ) { ensures true; } | |
60 | time_t time( time_t *__tloc ) {ensures true; } | |
61 | ||
62 | char *tzname[]; | |
63 | ||
64 | char *timezone() { ensures true; } | |
65 | ||
66 |