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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [include/] [time.h] - Blame information for rev 56

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 56 joel
#define _TIME_H_
9
 
10
#include "_ansi.h"
11
 
12 39 lampret
#ifdef __cplusplus
13
extern "C" {
14
#endif
15
 
16
#ifndef NULL
17 56 joel
#define NULL    0
18 39 lampret
#endif
19
 
20 56 joel
/* Get _CLOCKS_PER_SEC_ */
21
#include <machine/time.h>
22
 
23
#ifndef _CLOCKS_PER_SEC_
24
#define _CLOCKS_PER_SEC_ 1000
25
#endif
26
 
27
#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
28 39 lampret
#define CLK_TCK CLOCKS_PER_SEC
29
#define __need_size_t
30
#include <stddef.h>
31
 
32
/* Get _CLOCK_T_ and _TIME_T_.  */
33
#include <machine/types.h>
34
 
35
#ifndef __clock_t_defined
36
typedef _CLOCK_T_ clock_t;
37
#define __clock_t_defined
38
#endif
39
 
40
#ifndef __time_t_defined
41
typedef _TIME_T_ time_t;
42
#define __time_t_defined
43
#endif
44
 
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
};
57
 
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));
69
 
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 *));
74
 
75
#ifdef __CYGWIN32__
76
#ifndef __STRICT_ANSI__
77 56 joel
extern time_t _timezone __declspec(dllimport);
78
extern int _daylight __declspec(dllimport);
79
extern char *_tzname[2] __declspec(dllimport);
80
 
81 39 lampret
char *_EXFUN(timezone, (void));
82
void _EXFUN(tzset, (void));
83
#endif
84
#endif /* __CYGWIN32__ */
85
 
86
#ifdef __cplusplus
87
}
88
#endif
89
#endif /* _TIME_H_ */
90
 

powered by: WebSVN 2.1.0

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