PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
propgcc
propeller-elf
include
time.h
1
#ifndef _TIME_H
2
#define _TIME_H
3
4
#if defined(__cplusplus)
5
extern
"C"
{
6
#endif
7
8
typedef
unsigned
int
clock_t;
9
extern
clock_t
_clkfreq
;
10
/* the actual frequency the machine is running at may vary */
11
#define CLOCKS_PER_SEC _clkfreq
12
#define CLK_TCK _clkfreq
13
14
/* our time_t is the same as the Posix time_t:
15
* 86400 * (number of days past the epoch) + (seconds elapsed today)
16
* where "the epoch" is 00:00:00 UTC Jan. 1, 1970.
17
*
18
* this is often misquoted as "seconds elapsed since the epoch", but in
19
* fact it is not: it ignores the existence of leap seconds
20
*/
21
typedef
unsigned
long
time_t;
22
23
#ifndef _STRUCT_TM_DEFINED
24
#define _STRUCT_TM_DEFINED
25
/* time representing broken down calendar time */
26
struct
tm
{
27
int
tm_sec;
28
int
tm_min;
29
int
tm_hour;
30
int
tm_mday;
31
int
tm_mon;
32
int
tm_year;
/* years since 1900 */
33
int
tm_wday;
/* days since Sunday */
34
int
tm_yday;
/* days since January 1 */
35
int
tm_isdst;
/* if > 0, DST is in effect, if < 0 info is not known */
36
};
37
#endif
38
39
clock_t clock(
void
);
40
time_t time(time_t *);
41
double
difftime(time_t time2, time_t time1);
42
43
time_t mktime(
struct
tm
*stm);
44
45
struct
tm
*_gmtime_r(
const
time_t *t,
struct
tm
*stm);
46
struct
tm
*gmtime(
const
time_t *);
47
struct
tm
*_localtime_r(
const
time_t *,
struct
tm
*);
48
struct
tm
*localtime(
const
time_t *);
49
50
__SIZE_TYPE__ strftime(
char
*s, __SIZE_TYPE__ max,
const
char
*format,
const
struct
tm
*
tm
);
51
52
char
*asctime(
const
struct
tm
*stm);
53
char
*asctime_r(
const
struct
tm
*stm,
char
*buf);
54
char
*ctime(
const
time_t *timep);
55
char
*ctime_r(
const
time_t *timep,
char
*buf);
56
57
#if defined(_POSIX_SOURCE) || defined(_GNU_SOURCE)
58
struct
tm
*gmtime_r(
const
time_t *t,
struct
tm
*stm);
59
struct
tm
*localtime_r(
const
time_t *t,
struct
tm
*stm);
60
#endif
61
62
/* time zone functions */
63
/* set time zone to contents of environment string */
64
void
_tzset(
void
);
65
66
extern
char
*_tzname[2];
/* 0 is ordinary, 1 is dst */
67
extern
int
_timezone;
/* holds seconds west of GMT */
68
69
#if defined(__cplusplus)
70
}
71
#endif
72
73
#endif
_clkfreq
unsigned int _clkfreq
tm
Definition:
thread.h:39
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17