Subversion Repositories Kolibri OS

Rev

Rev 4973 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
2
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
3
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
4
#ifndef __dj_include_time_h_
5
#define __dj_include_time_h_
6
 
7
#ifdef __cplusplus
8
extern "C" {
9
#endif
10
 
11
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
12
 
5123 clevermous 13
#define CLOCKS_PER_SEC 100
4973 right-hear 14
 
15
#include 
16
 
17
/* Some programs think they know better... */
18
#undef NULL
19
 
20
#define NULL 0
21
__DJ_clock_t
22
#undef __DJ_clock_t
23
#define __DJ_clock_t
24
__DJ_size_t
25
#undef __DJ_size_t
26
#define __DJ_size_t
27
__DJ_time_t
28
#undef __DJ_time_t
29
#define __DJ_time_t
30
 
31
struct tm {
32
  int tm_sec;
33
  int tm_min;
34
  int tm_hour;
35
  int tm_mday;
36
  int tm_mon;
37
  int tm_year;
38
  int tm_wday;
39
  int tm_yday;
40
  int tm_isdst;
41
  char *__tm_zone;
42
  int __tm_gmtoff;
43
};
44
 
45
char *		asctime(const struct tm *_tptr);
46
clock_t		clock(void);
47
char *		ctime(const time_t *_cal);
48
double		difftime(time_t _t1, time_t _t0);
49
struct tm *	gmtime(const time_t *_tod);
50
struct tm *	localtime(const time_t *_tod);
51
time_t		mktime(struct tm *_tptr);
52
size_t		strftime(char *_s, size_t _n, const char *_format, const struct tm *_tptr);
53
time_t		time(time_t *_tod);
54
 
55
#ifndef __STRICT_ANSI__
56
 
57
#define CLK_TCK	CLOCKS_PER_SEC
58
 
59
extern char *tzname[2];
60
 
61
void	tzset(void);
62
 
63
#ifndef _POSIX_SOURCE
64
 
65
#define tm_zone __tm_zone
66
#define tm_gmtoff __tm_gmtoff
67
 
68
struct timeval {
69
  time_t tv_sec;
70
  long tv_usec;
71
};
72
 
73
struct timezone {
74
  int tz_minuteswest;
75
  int tz_dsttime;
76
};
77
 
78
#include 
79
 
80
typedef long long uclock_t;
81
#define UCLOCKS_PER_SEC 1193180
82
 
83
int		gettimeofday(struct timeval *_tp, struct timezone *_tzp);
84
unsigned long	rawclock(void);
85
int		select(int _nfds, fd_set *_readfds, fd_set *_writefds, fd_set *_exceptfds, struct timeval *_timeout);
86
int		settimeofday(struct timeval *_tp, ...);
87
void		tzsetwall(void);
88
uclock_t	uclock(void);
89
 
90
#endif /* !_POSIX_SOURCE */
91
#endif /* !__STRICT_ANSI__ */
92
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
93
 
94
#ifndef __dj_ENFORCE_FUNCTION_CALLS
95
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
96
 
97
#ifdef __cplusplus
98
}
99
#endif
100
 
101
#endif /* !__dj_include_time_h_ */