OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [newlib/] [libc/] [include/] [time.h] - Blame information for rev 39

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
 * time.h
3
 *
4
 * Struct and function declarations for dealing with time.
5
 */
6
 
7
#ifndef _TIME_H_
8
#ifdef __cplusplus
9
extern "C" {
10
#endif
11
#define _TIME_H_
12
 
13
#include "_ansi.h"
14
 
15
#ifndef NULL
16
#define NULL    0L
17
#endif
18
 
19
#define CLOCKS_PER_SEC 1000             /* Machine dependent */
20
#define CLK_TCK CLOCKS_PER_SEC
21
#define __need_size_t
22
#include <stddef.h>
23
 
24
/* Get _CLOCK_T_ and _TIME_T_.  */
25
#include <machine/types.h>
26
 
27
#ifndef __clock_t_defined
28
typedef _CLOCK_T_ clock_t;
29
#define __clock_t_defined
30
#endif
31
 
32
#ifndef __time_t_defined
33
typedef _TIME_T_ time_t;
34
#define __time_t_defined
35
#endif
36
 
37
struct tm
38
{
39
  int   tm_sec;
40
  int   tm_min;
41
  int   tm_hour;
42
  int   tm_mday;
43
  int   tm_mon;
44
  int   tm_year;
45
  int   tm_wday;
46
  int   tm_yday;
47
  int   tm_isdst;
48
};
49
 
50
clock_t    _EXFUN(clock,    (void));
51
double     _EXFUN(difftime, (time_t _time2, time_t _time1));
52
time_t     _EXFUN(mktime,   (struct tm *_timeptr));
53
time_t     _EXFUN(time,     (time_t *_timer));
54
#ifndef _REENT_ONLY
55
char      *_EXFUN(asctime,  (const struct tm *_tblock));
56
char      *_EXFUN(ctime,    (const time_t *_time));
57
struct tm *_EXFUN(gmtime,   (const time_t *_timer));
58
struct tm *_EXFUN(localtime,(const time_t *_timer));
59
#endif
60
size_t     _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
61
 
62
char      *_EXFUN(asctime_r,    (const struct tm *, char *));
63
char      *_EXFUN(ctime_r,      (const time_t *, char *));
64
struct tm *_EXFUN(gmtime_r,     (const time_t *, struct tm *));
65
struct tm *_EXFUN(localtime_r,  (const time_t *, struct tm *));
66
 
67
#ifdef __CYGWIN32__
68
#ifndef __STRICT_ANSI__
69
extern time_t *__imp__timezone;
70
#define _timezone (*__imp__timezone)
71
extern int *__imp__daylight;
72
#define _daylight (*__imp__daylight)
73
extern char *((*__imp__tzname)[2]);
74
#define _tzname (*__imp__tzname)
75
char *_EXFUN(timezone, (void));
76
void _EXFUN(tzset, (void));
77
#endif
78
#endif /* __CYGWIN32__ */
79
 
80
#ifdef __cplusplus
81
}
82
#endif
83
#endif /* _TIME_H_ */
84
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.