vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/rtc.h>


Link the library to the executable:

SceRtc_stub




Using this library in your project

Include the header file in your project:



Functions

unsigned int sceRtcGetTickResolution (void)
 
int sceRtcGetCurrentTick (SceRtcTick *tick)
 
int sceRtcGetCurrentClock (SceDateTime *time, int time_zone)
 Get current real time clock time. More...
 
int sceRtcGetCurrentClockLocalTime (SceDateTime *time)
 Get current real time clock time with system time zone. More...
 
int sceRtcGetCurrentNetworkTick (SceRtcTick *tick)
 
int sceRtcConvertUtcToLocalTime (const SceRtcTick *utc, SceRtcTick *local_time)
 
int sceRtcConvertLocalTimeToUtc (const SceRtcTick *local_time, SceRtcTick *utc)
 
int sceRtcIsLeapYear (int year)
 
int sceRtcCheckValid (const SceDateTime *time)
 
int sceRtcGetDaysInMonth (int year, int month)
 
int sceRtcGetDayOfWeek (int year, int month, int day)
 
int sceRtcSetTime_t (SceDateTime *time, time_t iTime)
 
int sceRtcSetTime64_t (SceDateTime *time, SceUInt64 ullTime)
 
int sceRtcGetTime_t (const SceDateTime *time, time_t *piTime)
 
int sceRtcGetTime64_t (const SceDateTime *time, SceUInt64 *pullTime)
 
int sceRtcSetDosTime (SceDateTime *time, unsigned int uiDosTime)
 
int sceRtcGetDosTime (const SceDateTime *time, unsigned int *puiDosTime)
 
int sceRtcSetWin32FileTime (SceDateTime *time, SceUInt64 ulWin32Time)
 
int sceRtcGetWin32FileTime (const SceDateTime *time, SceUInt64 *ulWin32Time)
 
int sceRtcSetTick (SceDateTime *time, const SceRtcTick *tick)
 
int sceRtcGetTick (const SceDateTime *time, SceRtcTick *tick)
 
int sceRtcCompareTick (const SceRtcTick *pTick1, const SceRtcTick *pTick2)
 
int sceRtcTickAddTicks (SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
 
int sceRtcTickAddMicroseconds (SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
 
int sceRtcTickAddSeconds (SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
 
int sceRtcTickAddMinutes (SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
 
int sceRtcTickAddHours (SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
 
int sceRtcTickAddDays (SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
 
int sceRtcTickAddWeeks (SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
 
int sceRtcTickAddMonths (SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
 
int sceRtcTickAddYears (SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
 
int sceRtcFormatRFC2822 (char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes)
 
int sceRtcFormatRFC2822LocalTime (char *pszDateTime, const SceRtcTick *utc)
 
int sceRtcFormatRFC3339 (char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes)
 
int sceRtcFormatRFC3339LocalTime (char *pszDateTime, const SceRtcTick *utc)
 
int sceRtcParseDateTime (SceRtcTick *utc, const char *pszDateTime)
 
int sceRtcParseRFC3339 (SceRtcTick *utc, const char *pszDateTime)
 
int _sceRtcConvertLocalTimeToUtc (const SceRtcTick *localtime, SceRtcTick *utc)
 Convert localtime to UTC. More...
 
int _sceRtcConvertUtcToLocalTime (const SceRtcTick *utc, SceRtcTick *localtime)
 Convert UTC to localtime. More...
 
int _sceRtcFormatRFC2822 (char *datetime, const SceRtcTick *utc, int offset, SceUInt64 *a4)
 Convert RFC2822 time string from UTC. More...
 
int _sceRtcFormatRFC2822LocalTime (char *datetime, const SceRtcTick *utc, SceUInt64 *a3)
 Convert RFC2822 time string from UTC with localtime. More...
 
int _sceRtcFormatRFC3339 (char *datetime, const SceRtcTick *utc, int offset, SceUInt64 *a4)
 Convert RFC3339 time string from UTC. More...
 
int _sceRtcFormatRFC3339LocalTime (char *datetime, const SceRtcTick *utc, SceUInt64 *a3)
 Convert RFC3339 time string from UTC with localtime. More...
 
int sceRtcGetCurrentAdNetworkTick (SceRtcTick *tick)
 
int sceRtcGetCurrentDebugNetworkTick (SceRtcTick *tick)
 
int sceRtcGetCurrentGpsTick (SceRtcTick *tick)
 
int sceRtcGetCurrentRetainedNetworkTick (SceRtcTick *tick)
 
int sceRtcGetLastAdjustedTick (SceRtcTick *tick)
 
int sceRtcGetLastReincarnatedTick (SceRtcTick *tick)
 
SceULong64 sceRtcGetAccumulativeTime (void)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceRtcErrorCode)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceRtcDayOfWeek)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceRtcTick)
 

Macros

#define sceRtcGetCurrentTickUtc(_tick)   sceRtcGetCurrentTick(_tick)
 
#define sceRtcGetCurrentClockUtc(_p)   sceRtcGetCurrentClock(_p,0)
 
#define sceRtcGetCurrentNetworkTickUtc(_tick)   sceRtcGetCurrentNetworkTick(_tick)
 
#define sceRtcConvertTime_tToDateTime(_timet, _pdatetime)   sceRtcSetTime_t(_pdatetime, _timet)
 
#define sceRtcConvertTime64_tToDateTime(_timet, _pdatetime)   sceRtcSetTime64_t(_pdatetime, _timet)
 
#define sceRtcConvertDateTimeToTime_t(_pdatetime, _ptimet)   sceRtcGetTime_t(_pdatetime, _ptimet)
 
#define sceRtcConvertDateTimeToTime64_t(_pdatetime, _ptimet)   sceRtcGetTime64_t(_pdatetime, _ptimet)
 
#define sceRtcConvertDosTimeToDateTime(_dostime, _pdatetime)   sceRtcSetDosTime(_pdatetime, _dostime)
 
#define sceRtcConvertDateTimeToDosTime(_pdatetime, _pdostime)   sceRtcGetDosTime(_pdatetime, _pdostime)
 
#define sceRtcConvertWin32TimeToDateTime(_pw32time, _pdatetime)   sceRtcSetWin32FileTime(_pdatetime, _pw32time)
 
#define sceRtcConvertDateTimeToWin32Time(_pdatetime, _pw32time)   sceRtcGetWin32FileTime(_pdatetime, _pw32time)
 
#define sceRtcConvertTickToDateTime(_ptick, _pdatetime)   sceRtcSetTick(_pdatetime, _ptick)
 
#define sceRtcConvertDateTimeToTick(_pdatetime, _ptick)   sceRtcGetTick(_pdatetime, _ptick)
 

Data Structure Documentation

◆ SceRtcTick

struct SceRtcTick
Data Fields
SceUInt64 tick

Macro Definition Documentation

◆ sceRtcGetCurrentTickUtc

#define sceRtcGetCurrentTickUtc (   _tick)    sceRtcGetCurrentTick(_tick)

◆ sceRtcGetCurrentClockUtc

#define sceRtcGetCurrentClockUtc (   _p)    sceRtcGetCurrentClock(_p,0)

◆ sceRtcGetCurrentNetworkTickUtc

#define sceRtcGetCurrentNetworkTickUtc (   _tick)    sceRtcGetCurrentNetworkTick(_tick)

◆ sceRtcConvertTime_tToDateTime

#define sceRtcConvertTime_tToDateTime (   _timet,
  _pdatetime 
)    sceRtcSetTime_t(_pdatetime, _timet)

◆ sceRtcConvertTime64_tToDateTime

#define sceRtcConvertTime64_tToDateTime (   _timet,
  _pdatetime 
)    sceRtcSetTime64_t(_pdatetime, _timet)

◆ sceRtcConvertDateTimeToTime_t

#define sceRtcConvertDateTimeToTime_t (   _pdatetime,
  _ptimet 
)    sceRtcGetTime_t(_pdatetime, _ptimet)

◆ sceRtcConvertDateTimeToTime64_t

#define sceRtcConvertDateTimeToTime64_t (   _pdatetime,
  _ptimet 
)    sceRtcGetTime64_t(_pdatetime, _ptimet)

◆ sceRtcConvertDosTimeToDateTime

#define sceRtcConvertDosTimeToDateTime (   _dostime,
  _pdatetime 
)    sceRtcSetDosTime(_pdatetime, _dostime)

◆ sceRtcConvertDateTimeToDosTime

#define sceRtcConvertDateTimeToDosTime (   _pdatetime,
  _pdostime 
)    sceRtcGetDosTime(_pdatetime, _pdostime)

◆ sceRtcConvertWin32TimeToDateTime

#define sceRtcConvertWin32TimeToDateTime (   _pw32time,
  _pdatetime 
)    sceRtcSetWin32FileTime(_pdatetime, _pw32time)

◆ sceRtcConvertDateTimeToWin32Time

#define sceRtcConvertDateTimeToWin32Time (   _pdatetime,
  _pw32time 
)    sceRtcGetWin32FileTime(_pdatetime, _pw32time)

◆ sceRtcConvertTickToDateTime

#define sceRtcConvertTickToDateTime (   _ptick,
  _pdatetime 
)    sceRtcSetTick(_pdatetime, _ptick)

◆ sceRtcConvertDateTimeToTick

#define sceRtcConvertDateTimeToTick (   _pdatetime,
  _ptick 
)    sceRtcGetTick(_pdatetime, _ptick)

Enumeration Type Documentation

◆ SceRtcErrorCode

Enumerator
SCE_RTC_ERROR_INVALID_VALUE 
SCE_RTC_ERROR_INVALID_POINTER 
SCE_RTC_ERROR_NOT_INITIALIZED 
SCE_RTC_ERROR_ALREADY_REGISTERD 
SCE_RTC_ERROR_NOT_FOUND 
SCE_RTC_ERROR_BAD_PARSE 
SCE_RTC_ERROR_INVALID_YEAR 
SCE_RTC_ERROR_INVALID_MONTH 
SCE_RTC_ERROR_INVALID_DAY 
SCE_RTC_ERROR_INVALID_HOUR 
SCE_RTC_ERROR_INVALID_MINUTE 
SCE_RTC_ERROR_INVALID_SECOND 
SCE_RTC_ERROR_INVALID_MICROSECOND 

◆ SceRtcDayOfWeek

Enumerator
SCE_RTC_DAYOFWEEK_SUNDAY 
SCE_RTC_DAYOFWEEK_MONDAY 
SCE_RTC_DAYOFWEEK_TUESDAY 
SCE_RTC_DAYOFWEEK_WEDNESDAY 
SCE_RTC_DAYOFWEEK_THURSDAY 
SCE_RTC_DAYOFWEEK_FRIDAY 
SCE_RTC_DAYOFWEEK_SATURDAY 
__SCE_RTC_DAYOFWEEK 

Function Documentation

◆ sceRtcGetTickResolution()

unsigned int sceRtcGetTickResolution ( void  )

◆ sceRtcGetCurrentTick()

int sceRtcGetCurrentTick ( SceRtcTick tick)

◆ sceRtcGetCurrentClock()

int sceRtcGetCurrentClock ( SceDateTime time,
int  time_zone 
)

Get current real time clock time.

Parameters
[out]time- see SceDateTime.
[in]time_zone- The time zone the return value will be.
Returns
0 on success, < 0 on error.

◆ sceRtcGetCurrentClockLocalTime()

int sceRtcGetCurrentClockLocalTime ( SceDateTime time)

Get current real time clock time with system time zone.

Parameters
[out]time- see SceDateTime.
Returns
0 on success, < 0 on error.

◆ sceRtcGetCurrentNetworkTick()

int sceRtcGetCurrentNetworkTick ( SceRtcTick tick)

◆ sceRtcConvertUtcToLocalTime()

int sceRtcConvertUtcToLocalTime ( const SceRtcTick utc,
SceRtcTick local_time 
)

◆ sceRtcConvertLocalTimeToUtc()

int sceRtcConvertLocalTimeToUtc ( const SceRtcTick local_time,
SceRtcTick utc 
)

◆ sceRtcIsLeapYear()

int sceRtcIsLeapYear ( int  year)

◆ sceRtcCheckValid()

int sceRtcCheckValid ( const SceDateTime time)

◆ sceRtcGetDaysInMonth()

int sceRtcGetDaysInMonth ( int  year,
int  month 
)

◆ sceRtcGetDayOfWeek()

int sceRtcGetDayOfWeek ( int  year,
int  month,
int  day 
)

◆ sceRtcSetTime_t()

int sceRtcSetTime_t ( SceDateTime time,
time_t  iTime 
)

◆ sceRtcSetTime64_t()

int sceRtcSetTime64_t ( SceDateTime time,
SceUInt64  ullTime 
)

◆ sceRtcGetTime_t()

int sceRtcGetTime_t ( const SceDateTime time,
time_t *  piTime 
)

◆ sceRtcGetTime64_t()

int sceRtcGetTime64_t ( const SceDateTime time,
SceUInt64 pullTime 
)

◆ sceRtcSetDosTime()

int sceRtcSetDosTime ( SceDateTime time,
unsigned int  uiDosTime 
)

◆ sceRtcGetDosTime()

int sceRtcGetDosTime ( const SceDateTime time,
unsigned int *  puiDosTime 
)

◆ sceRtcSetWin32FileTime()

int sceRtcSetWin32FileTime ( SceDateTime time,
SceUInt64  ulWin32Time 
)

◆ sceRtcGetWin32FileTime()

int sceRtcGetWin32FileTime ( const SceDateTime time,
SceUInt64 ulWin32Time 
)

◆ sceRtcSetTick()

int sceRtcSetTick ( SceDateTime time,
const SceRtcTick tick 
)

◆ sceRtcGetTick()

int sceRtcGetTick ( const SceDateTime time,
SceRtcTick tick 
)

◆ sceRtcCompareTick()

int sceRtcCompareTick ( const SceRtcTick pTick1,
const SceRtcTick pTick2 
)

◆ sceRtcTickAddTicks()

int sceRtcTickAddTicks ( SceRtcTick pTick0,
const SceRtcTick pTick1,
SceLong64  lAdd 
)

◆ sceRtcTickAddMicroseconds()

int sceRtcTickAddMicroseconds ( SceRtcTick pTick0,
const SceRtcTick pTick1,
SceLong64  lAdd 
)

◆ sceRtcTickAddSeconds()

int sceRtcTickAddSeconds ( SceRtcTick pTick0,
const SceRtcTick pTick1,
SceLong64  lAdd 
)

◆ sceRtcTickAddMinutes()

int sceRtcTickAddMinutes ( SceRtcTick pTick0,
const SceRtcTick pTick1,
SceLong64  lAdd 
)

◆ sceRtcTickAddHours()

int sceRtcTickAddHours ( SceRtcTick pTick0,
const SceRtcTick pTick1,
int  lAdd 
)

◆ sceRtcTickAddDays()

int sceRtcTickAddDays ( SceRtcTick pTick0,
const SceRtcTick pTick1,
int  lAdd 
)

◆ sceRtcTickAddWeeks()

int sceRtcTickAddWeeks ( SceRtcTick pTick0,
const SceRtcTick pTick1,
int  lAdd 
)

◆ sceRtcTickAddMonths()

int sceRtcTickAddMonths ( SceRtcTick pTick0,
const SceRtcTick pTick1,
int  lAdd 
)

◆ sceRtcTickAddYears()

int sceRtcTickAddYears ( SceRtcTick pTick0,
const SceRtcTick pTick1,
int  lAdd 
)

◆ sceRtcFormatRFC2822()

int sceRtcFormatRFC2822 ( char *  pszDateTime,
const SceRtcTick utc,
int  iTimeZoneMinutes 
)

◆ sceRtcFormatRFC2822LocalTime()

int sceRtcFormatRFC2822LocalTime ( char *  pszDateTime,
const SceRtcTick utc 
)

◆ sceRtcFormatRFC3339()

int sceRtcFormatRFC3339 ( char *  pszDateTime,
const SceRtcTick utc,
int  iTimeZoneMinutes 
)

◆ sceRtcFormatRFC3339LocalTime()

int sceRtcFormatRFC3339LocalTime ( char *  pszDateTime,
const SceRtcTick utc 
)

◆ sceRtcParseDateTime()

int sceRtcParseDateTime ( SceRtcTick utc,
const char *  pszDateTime 
)

◆ sceRtcParseRFC3339()

int sceRtcParseRFC3339 ( SceRtcTick utc,
const char *  pszDateTime 
)

◆ _sceRtcConvertLocalTimeToUtc()

int _sceRtcConvertLocalTimeToUtc ( const SceRtcTick localtime,
SceRtcTick utc 
)

Convert localtime to UTC.

Parameters
[in]localtime- The localtime buffer pointer
[out]utc- The UTC buffer pointer
Returns
0 on success, < 0 on error.

◆ _sceRtcConvertUtcToLocalTime()

int _sceRtcConvertUtcToLocalTime ( const SceRtcTick utc,
SceRtcTick localtime 
)

Convert UTC to localtime.

Parameters
[in]utc- The UTC buffer pointer
[out]localtime- The localtime buffer pointer
Returns
0 on success, < 0 on error.

◆ _sceRtcFormatRFC2822()

int _sceRtcFormatRFC2822 ( char *  datetime,
const SceRtcTick utc,
int  offset,
SceUInt64 a4 
)

Convert RFC2822 time string from UTC.

Parameters
[out]datetime- The datetime string buffer
[in]utc- The UTC time tick pointer
[in]offset- A timezone offset. this value have to minute value
[in]a4- The Syscall validity buffer
Returns
0 on success, < 0 on error.

◆ _sceRtcFormatRFC2822LocalTime()

int _sceRtcFormatRFC2822LocalTime ( char *  datetime,
const SceRtcTick utc,
SceUInt64 a3 
)

Convert RFC2822 time string from UTC with localtime.

Parameters
[out]datetime- The datetime string buffer
[in]utc- The UTC time tick pointer
[in]a3- The Syscall validity buffer
Returns
0 on success, < 0 on error.

◆ _sceRtcFormatRFC3339()

int _sceRtcFormatRFC3339 ( char *  datetime,
const SceRtcTick utc,
int  offset,
SceUInt64 a4 
)

Convert RFC3339 time string from UTC.

Parameters
[out]datetime- The datetime string buffer
[in]utc- The UTC time tick pointer
[in]offset- A timezone offset. this value have to minute value
[in]a4- The Syscall validity buffer
Returns
0 on success, < 0 on error.

◆ _sceRtcFormatRFC3339LocalTime()

int _sceRtcFormatRFC3339LocalTime ( char *  datetime,
const SceRtcTick utc,
SceUInt64 a3 
)

Convert RFC3339 time string from UTC with localtime.

Parameters
[out]datetime- The datetime string buffer
[in]utc- The UTC time tick pointer
[in]a3- The Syscall validity buffer
Returns
0 on success, < 0 on error.

◆ sceRtcGetCurrentAdNetworkTick()

int sceRtcGetCurrentAdNetworkTick ( SceRtcTick tick)

◆ sceRtcGetCurrentDebugNetworkTick()

int sceRtcGetCurrentDebugNetworkTick ( SceRtcTick tick)

◆ sceRtcGetCurrentGpsTick()

int sceRtcGetCurrentGpsTick ( SceRtcTick tick)

◆ sceRtcGetCurrentRetainedNetworkTick()

int sceRtcGetCurrentRetainedNetworkTick ( SceRtcTick tick)

◆ sceRtcGetLastAdjustedTick()

int sceRtcGetLastAdjustedTick ( SceRtcTick tick)

◆ sceRtcGetLastReincarnatedTick()

int sceRtcGetLastReincarnatedTick ( SceRtcTick tick)

◆ sceRtcGetAccumulativeTime()

SceULong64 sceRtcGetAccumulativeTime ( void  )

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( ,
SceRtcErrorCode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( ,
SceRtcDayOfWeek   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( ,
SceRtcTick   
)