]> git.sur5r.net Git - cc65/blob - include/time.h
Added standard copyright header, fixed a wrong macro name.
[cc65] / include / time.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                  time.h                                   */
4 /*                                                                           */
5 /*                               Date and time                               */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2000 Ullrich von Bassewitz                                       */
10 /*               Wacholderweg 14                                             */
11 /*               D-70597 Stuttgart                                           */
12 /* EMail:        uz@musoftware.de                                            */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef _TIME_H
37 #define _TIME_H
38
39
40
41 /* NULL pointer */
42 #ifdef NULL
43 #  undef NULL
44 #endif
45 #define NULL    0
46
47 typedef unsigned long time_t;
48 typedef unsigned long clock_t;
49
50 /* Structure for broken down time */
51 struct tm {
52     int tm_sec;
53     int tm_min;
54     int tm_hour;
55     int tm_mday;
56     int tm_mon;           
57     int tm_year;
58     int tm_wday;
59     int tm_yday;
60     int tm_isdst;
61 };
62
63 /* The 610 gets its clock from the AC current */
64 #ifdef __CBM__
65 #  ifdef __CBM610__
66 #    define CLK_TCK             50      /* POSIX */
67 #    define CLOCKS_PER_SEC      50      /* ANSI */
68 #  else
69 #    define CLK_TCK             60      /* POSIX */
70 #    define CLOCKS_PER_SEC      60      /* ANSI */
71 #  endif
72 #endif
73
74
75
76 /* Function prototypes */
77 clock_t clock (void);
78
79
80
81 /* End of time.h */
82
83 #endif
84
85
86