Search
lxdream.org :: lxdream/test/include/time.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/time.h
changeset 185:6755a04c447f
author nkeynes
date Sat Aug 05 00:18:21 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change Add error lines to tests with incomplete polys
Split clip tests to separate data file
Add tests for cmd bit 23 ("use list size field")
view annotate diff log raw
     1 /*
     2  * time.h
     3  * 
     4  * Struct and function declarations for dealing with time.
     5  */
     7 #ifndef _TIME_H_
     8 #define _TIME_H_
    10 #include "_ansi.h"
    12 #ifdef __cplusplus
    13 extern "C" {
    14 #endif
    16 #ifndef NULL
    17 #define	NULL	0
    18 #endif
    20 /* Get _CLOCKS_PER_SEC_ */
    21 #include <machine/time.h>
    23 #ifndef _CLOCKS_PER_SEC_
    24 #define _CLOCKS_PER_SEC_ 1000
    25 #endif
    27 #define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
    28 #define CLK_TCK CLOCKS_PER_SEC
    29 #define __need_size_t
    30 #include <stddef.h>
    32 /* Get _CLOCK_T_ and _TIME_T_.  */
    33 #include <machine/types.h>
    35 #ifndef __clock_t_defined
    36 typedef _CLOCK_T_ clock_t;
    37 #define __clock_t_defined
    38 #endif
    40 #ifndef __time_t_defined
    41 typedef _TIME_T_ time_t;
    42 #define __time_t_defined
    43 #endif
    45 struct tm
    46 {
    47   int	tm_sec;
    48   int	tm_min;
    49   int	tm_hour;
    50   int	tm_mday;
    51   int	tm_mon;
    52   int	tm_year;
    53   int	tm_wday;
    54   int	tm_yday;
    55   int	tm_isdst;
    56 };
    58 clock_t	   _EXFUN(clock,    (void));
    59 double	   _EXFUN(difftime, (time_t _time2, time_t _time1));
    60 time_t	   _EXFUN(mktime,   (struct tm *_timeptr));
    61 time_t	   _EXFUN(time,     (time_t *_timer));
    62 #ifndef _REENT_ONLY
    63 char	  *_EXFUN(asctime,  (const struct tm *_tblock));
    64 char	  *_EXFUN(ctime,    (const time_t *_time));
    65 struct tm *_EXFUN(gmtime,   (const time_t *_timer));
    66 struct tm *_EXFUN(localtime,(const time_t *_timer));
    67 #endif
    68 size_t	   _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
    70 char	  *_EXFUN(asctime_r,	(const struct tm *, char *));
    71 char	  *_EXFUN(ctime_r,	(const time_t *, char *));
    72 struct tm *_EXFUN(gmtime_r,	(const time_t *, struct tm *));
    73 struct tm *_EXFUN(localtime_r,	(const time_t *, struct tm *));
    75 #ifdef __CYGWIN32__
    76 #ifndef __STRICT_ANSI__
    77 extern time_t _timezone __declspec(dllimport);
    78 extern int _daylight __declspec(dllimport);
    79 extern char *_tzname[2] __declspec(dllimport);
    81 char *_EXFUN(timezone, (void));
    82 void _EXFUN(tzset, (void));
    83 #endif
    84 #endif /* __CYGWIN32__ */
    86 #ifdef __cplusplus
    87 }
    88 #endif
    89 #endif /* _TIME_H_ */
.