-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtime.h
More file actions
65 lines (49 loc) · 1.79 KB
/
time.h
File metadata and controls
65 lines (49 loc) · 1.79 KB
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
/*********************************************************************/
/* */
/* This Program Written by Paul Edwards. */
/* Released to the Public Domain */
/* */
/*********************************************************************/
/*********************************************************************/
/* */
/* time.h - time header file. */
/* */
/*********************************************************************/
#ifndef __TIME_INCLUDED
#define __TIME_INCLUDED
#define CLOCKS_PER_SEC 1000
#define NULL ((void *)0)
typedef unsigned int clock_t;
#ifndef __SIZE_T_DEFINED
#define __SIZE_T_DEFINED
#if (defined(__OS2__) || defined(__32BIT__) || defined(__MVS__) \
|| defined(__CMS__))
typedef unsigned long size_t;
#elif (defined(__MSDOS__) || defined(__DOS__) || defined(__POWERC) \
|| defined(__WIN32__))
typedef unsigned int size_t;
#endif
#endif
typedef unsigned long time_t;
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
time_t time(time_t *timer);
clock_t clock(void);
double difftime(time_t time1, time_t time0);
time_t mktime(struct tm *timeptr);
char *asctime(const struct tm *timeptr);
char *ctime(const time_t *timer);
struct tm *gmtime(const time_t *timer);
struct tm *localtime(const time_t *timer);
size_t strftime(char *s, size_t maxsize,
const char *format, const struct tm *timeptr);
#endif