Search
lxdream.org :: lxdream/test/include/time.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/time.h
changeset 185:6755a04c447f
author nkeynes
date Tue Jul 11 01:35:27 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/include/time.h Tue Jul 11 01:35:27 2006 +0000
1.3 @@ -0,0 +1,90 @@
1.4 +/*
1.5 + * time.h
1.6 + *
1.7 + * Struct and function declarations for dealing with time.
1.8 + */
1.9 +
1.10 +#ifndef _TIME_H_
1.11 +#define _TIME_H_
1.12 +
1.13 +#include "_ansi.h"
1.14 +
1.15 +#ifdef __cplusplus
1.16 +extern "C" {
1.17 +#endif
1.18 +
1.19 +#ifndef NULL
1.20 +#define NULL 0
1.21 +#endif
1.22 +
1.23 +/* Get _CLOCKS_PER_SEC_ */
1.24 +#include <machine/time.h>
1.25 +
1.26 +#ifndef _CLOCKS_PER_SEC_
1.27 +#define _CLOCKS_PER_SEC_ 1000
1.28 +#endif
1.29 +
1.30 +#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
1.31 +#define CLK_TCK CLOCKS_PER_SEC
1.32 +#define __need_size_t
1.33 +#include <stddef.h>
1.34 +
1.35 +/* Get _CLOCK_T_ and _TIME_T_. */
1.36 +#include <machine/types.h>
1.37 +
1.38 +#ifndef __clock_t_defined
1.39 +typedef _CLOCK_T_ clock_t;
1.40 +#define __clock_t_defined
1.41 +#endif
1.42 +
1.43 +#ifndef __time_t_defined
1.44 +typedef _TIME_T_ time_t;
1.45 +#define __time_t_defined
1.46 +#endif
1.47 +
1.48 +struct tm
1.49 +{
1.50 + int tm_sec;
1.51 + int tm_min;
1.52 + int tm_hour;
1.53 + int tm_mday;
1.54 + int tm_mon;
1.55 + int tm_year;
1.56 + int tm_wday;
1.57 + int tm_yday;
1.58 + int tm_isdst;
1.59 +};
1.60 +
1.61 +clock_t _EXFUN(clock, (void));
1.62 +double _EXFUN(difftime, (time_t _time2, time_t _time1));
1.63 +time_t _EXFUN(mktime, (struct tm *_timeptr));
1.64 +time_t _EXFUN(time, (time_t *_timer));
1.65 +#ifndef _REENT_ONLY
1.66 +char *_EXFUN(asctime, (const struct tm *_tblock));
1.67 +char *_EXFUN(ctime, (const time_t *_time));
1.68 +struct tm *_EXFUN(gmtime, (const time_t *_timer));
1.69 +struct tm *_EXFUN(localtime,(const time_t *_timer));
1.70 +#endif
1.71 +size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
1.72 +
1.73 +char *_EXFUN(asctime_r, (const struct tm *, char *));
1.74 +char *_EXFUN(ctime_r, (const time_t *, char *));
1.75 +struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *));
1.76 +struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
1.77 +
1.78 +#ifdef __CYGWIN32__
1.79 +#ifndef __STRICT_ANSI__
1.80 +extern time_t _timezone __declspec(dllimport);
1.81 +extern int _daylight __declspec(dllimport);
1.82 +extern char *_tzname[2] __declspec(dllimport);
1.83 +
1.84 +char *_EXFUN(timezone, (void));
1.85 +void _EXFUN(tzset, (void));
1.86 +#endif
1.87 +#endif /* __CYGWIN32__ */
1.88 +
1.89 +#ifdef __cplusplus
1.90 +}
1.91 +#endif
1.92 +#endif /* _TIME_H_ */
1.93 +
.