PSPSDK 2024-10-31
Loading...
Searching...
No Matches
psprtc.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
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 */
13#ifndef __PSPRTC_H__
14#define __PSPRTC_H__
15
16#include <time.h>
17#include <psptypes.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
32
39
47
56
64
73
82
89int sceRtcIsLeapYear(int year);
90
98int sceRtcGetDaysInMonth(int year, int month);
99
108int sceRtcGetDayOfWeek(int year, int month, int day);
109
117
126
135
143int sceRtcCompareTick(const u64* tick1, const u64* tick2);
144
154
164
174
184
194
204
214
215
225
235
242
244
249
254
259
264
269
270#ifdef __cplusplus
271}
272#endif
273
274#endif
int sceRtcTickAddSeconds(u64 *destTick, const u64 *srcTick, u64 numSecs)
Add an amount of seconds to a tick.
int sceRtcTickAddHours(u64 *destTick, const u64 *srcTick, int numHours)
Add an amount of hours to a tick.
int sceRtcTickAddMinutes(u64 *destTick, const u64 *srcTick, u64 numMins)
Add an amount of minutes to a tick.
int sceRtcGetWin32FileTime(ScePspDateTime *date, u64 *win32Time)
int sceRtcGetTick(const ScePspDateTime *date, u64 *tick)
Set ticks based on a ScePspDateTime struct.
int sceRtcGetTime_t(const ScePspDateTime *date, time_t *time)
int sceRtcFormatRFC2822(char *pszDateTime, const u64 *pUtc, int iTimeZoneMinutes)
Format Tick-representation UTC time in RFC2822 format.
int sceRtcGetCurrentTick(u64 *tick)
Get current tick count.
int sceRtcGetDayOfWeek(int year, int month, int day)
Get day of the week for a date.
int sceRtcSetDosTime(ScePspDateTime *date, u32 dosTime)
int sceRtcFormatRFC3339LocalTime(char *pszDateTime, const u64 *pUtc)
Format Tick-representation UTC time in RFC3339(ISO8601) format.
int sceRtcCompareTick(const u64 *tick1, const u64 *tick2)
Compare two ticks.
int sceRtcGetDosTime(ScePspDateTime *date, u32 dosTime)
int sceRtcTickAddTicks(u64 *destTick, const u64 *srcTick, u64 numTicks)
Add two ticks.
int sceRtcTickAddMonths(u64 *destTick, const u64 *srcTick, int numMonths)
Add an amount of months to a tick.
int sceRtcParseRFC3339(u64 *pUtc, const char *pszDateTime)
Parse time information represented in RFC3339 format.
int sceRtcFormatRFC2822LocalTime(char *pszDateTime, const u64 *pUtc)
Format Tick-representation UTC time in RFC2822 format.
int sceRtcFormatRFC3339(char *pszDateTime, const u64 *pUtc, int iTimeZoneMinutes)
Format Tick-representation UTC time in RFC3339(ISO8601) format.
int sceRtcConvertUtcToLocalTime(const u64 *tickUTC, u64 *tickLocal)
Convert a UTC-based tickcount into a local time tick count.
int sceRtcConvertLocalTimeToUTC(const u64 *tickLocal, u64 *tickUTC)
Convert a local time based tickcount into a UTC-based tick count.
u32 sceRtcGetTickResolution()
Get the resolution of the tick counter.
int sceRtcParseDateTime(u64 *destTick, const char *dateString)
int sceRtcGetDaysInMonth(int year, int month)
Get number of days in a specific month.
int sceRtcIsLeapYear(int year)
Check if a year is a leap year.
pspRtcCheckValidErrors
Definition psprtc.h:23
@ PSP_TIME_INVALID_SECONDS
Definition psprtc.h:29
@ PSP_TIME_INVALID_HOUR
Definition psprtc.h:27
@ PSP_TIME_INVALID_MONTH
Definition psprtc.h:25
@ PSP_TIME_INVALID_MINUTES
Definition psprtc.h:28
@ PSP_TIME_INVALID_MICROSECONDS
Definition psprtc.h:30
@ PSP_TIME_INVALID_YEAR
Definition psprtc.h:24
@ PSP_TIME_INVALID_DAY
Definition psprtc.h:26
int sceRtcTickAddDays(u64 *destTick, const u64 *srcTick, int numDays)
Add an amount of days to a tick.
int sceRtcSetTick(ScePspDateTime *date, const u64 *tick)
Set a ScePspDateTime struct based on ticks.
int sceRtcSetTime_t(ScePspDateTime *date, const time_t time)
int sceRtcCheckValid(const ScePspDateTime *date)
Validate pspDate component ranges.
int sceRtcTickAddWeeks(u64 *destTick, const u64 *srcTick, int numWeeks)
Add an amount of weeks to a tick.
int sceRtcTickAddMicroseconds(u64 *destTick, const u64 *srcTick, u64 numMS)
Add an amount of ms to a tick.
int sceRtcSetWin32FileTime(ScePspDateTime *date, u64 *win32Time)
int sceRtcTickAddYears(u64 *destTick, const u64 *srcTick, int numYears)
Add an amount of years to a tick.
int sceRtcGetCurrentClock(ScePspDateTime *time, int tz)
Get current tick count, adjusted for local time zone.
int sceRtcGetCurrentClockLocalTime(ScePspDateTime *time)
Get current local time into a ScePspDateTime struct.
uint64_t u64
Definition psptypes.h:42
float x
Definition psptypes.h:0
uint32_t u32
Definition psptypes.h:41
Definition psptypes.h:419