pspsdk-1.0+beta2
Main Page
Modules
Data Structures
Files
File List
Globals
psprtc.h
Go to the documentation of this file.
1
/*
2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5
*
6
* psprtc.h - Prototypes for the sceRtc library
7
*
8
* Function returns marked with (?) have not been tested.
9
*
10
* Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11
*
12
* $Id: psprtc.h 2091 2006-12-06 18:11:29Z tyranid $
13
*/
14
#ifndef __PSPRTC_H__
15
#define __PSPRTC_H__
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
typedef
struct
{
22
u16
year
;
23
u16
month
;
24
u16
day
;
25
u16
hour
;
26
u16
minutes
;
27
u16
seconds
;
28
u32
microseconds
;
29
}
pspTime
;
30
31
enum
pspRtcCheckValidErrors
{
32
PSP_TIME_INVALID_YEAR
= -1,
33
PSP_TIME_INVALID_MONTH
= -2,
34
PSP_TIME_INVALID_DAY
= -3,
35
PSP_TIME_INVALID_HOUR
= -4,
36
PSP_TIME_INVALID_MINUTES
= -5,
37
PSP_TIME_INVALID_SECONDS
= -6,
38
PSP_TIME_INVALID_MICROSECONDS
= -7
39
};
40
46
u32
sceRtcGetTickResolution
();
47
54
int
sceRtcGetCurrentTick
(
u64
*tick);
55
63
int
sceRtcGetCurrentClock
(
pspTime
*
time
,
int
tz);
64
71
int
sceRtcGetCurrentClockLocalTime
(
pspTime
*
time
);
72
80
int
sceRtcConvertUtcToLocalTime
(
const
u64
* tickUTC,
u64
* tickLocal);
81
89
int
sceRtcConvertLocalTimeToUTC
(
const
u64
* tickLocal,
u64
* tickUTC);
90
97
int
sceRtcIsLeapYear
(
int
year);
98
106
int
sceRtcGetDaysInMonth
(
int
year,
int
month);
107
116
int
sceRtcGetDayOfWeek
(
int
year,
int
month,
int
day);
117
124
int
sceRtcCheckValid
(
const
pspTime
* date);
125
133
int
sceRtcSetTick
(
pspTime
* date,
const
u64
* tick);
134
142
int
sceRtcGetTick
(
const
pspTime
* date,
u64
*tick);
143
151
int
sceRtcCompareTick
(
const
u64
* tick1,
const
u64
* tick2);
152
161
int
sceRtcTickAddTicks
(
u64
* destTick,
const
u64
* srcTick,
u64
numTicks);
162
171
int
sceRtcTickAddMicroseconds
(
u64
* destTick,
const
u64
* srcTick,
u64
numMS);
172
181
int
sceRtcTickAddSeconds
(
u64
* destTick,
const
u64
* srcTick,
u64
numSecs);
182
191
int
sceRtcTickAddMinutes
(
u64
* destTick,
const
u64
* srcTick,
u64
numMins);
192
201
int
sceRtcTickAddHours
(
u64
* destTick,
const
u64
* srcTick,
int
numHours);
202
211
int
sceRtcTickAddDays
(
u64
* destTick,
const
u64
* srcTick,
int
numDays);
212
221
int
sceRtcTickAddWeeks
(
u64
* destTick,
const
u64
* srcTick,
int
numWeeks);
222
223
232
int
sceRtcTickAddMonths
(
u64
* destTick,
const
u64
* srcTick,
int
numMonths);
233
242
int
sceRtcTickAddYears
(
u64
* destTick,
const
u64
* srcTick,
int
numYears);
243
244
int
sceRtcSetTime_t
(
pspTime
* date,
const
time_t
time
);
245
int
sceRtcGetTime_t
(
const
pspTime
* date,
time_t
*
time
);
246
int
sceRtcSetDosTime
(
pspTime
* date,
u32
dosTime);
247
int
sceRtcGetDosTime
(
pspTime
* date,
u32
dosTime);
248
int
sceRtcSetWin32FileTime
(
pspTime
* date,
u64
* win32Time);
249
int
sceRtcGetWin32FileTime
(
pspTime
* date,
u64
* win32Time);
250
251
int
sceRtcParseDateTime
(
u64
*destTick,
const
char
*dateString);
252
/*
253
sceRtcFormatRFC2822
254
sceRtcFormatRFC2822LocalTime
255
sceRtcFormatRFC3339
256
sceRtcFormatRFC3339LocalTime
257
258
sceRtcParseRFC3339
259
*/
260
261
#ifdef __cplusplus
262
}
263
#endif
264
265
#endif
src
rtc
psprtc.h
Generated on Sat Apr 9 2016 07:00:25 for pspsdk-1.0+beta2 by
1.8.1.2