vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Functions

int ksceRtcSetCurrentTick (SceRtcTick *tick)
 
int ksceRtcGetCurrentTick (SceRtcTick *tick)
 
int ksceRtcGetCurrentClock (SceDateTime *time, int time_zone)
 Get current real time clock time.
 
int ksceRtcGetCurrentClockLocalTime (SceDateTime *time)
 Get current real time clock time with system time zone.
 
int ksceRtcSetCurrentNetworkTick (SceRtcTick *tick)
 
int ksceRtcGetCurrentNetworkTick (SceRtcTick *tick)
 
int ksceRtcSetCurrentSecureTick (SceRtcTick *tick)
 
int ksceRtcGetCurrentSecureTick (SceRtcTick *tick)
 
int ksceRtcSetCurrentDebugNetworkTick (SceRtcTick *tick)
 
int ksceRtcGetCurrentDebugNetworkTick (SceRtcTick *tick)
 
int ksceRtcConvertTickToDateTime (SceDateTime *dst, SceRtcTick *src)
 Convert tick to date time.
 
int ksceRtcConvertDateTimeToUnixTime (const SceDateTime *src, SceUInt64 *dst)
 Convert date time to unix time.
 
int ksceRtcFormatRFC3339 (char *date_time, const SceRtcTick *utc, int time_zone_minutes)
 Format an RTC tick as an RFC 3339 timestamp.
 
SceULong64 ksceRtcGetAccumulativeTime (void)
 Return the accumulated system-time counter in microseconds.
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceRtcForDriver_stub



Function Documentation

◆ ksceRtcSetCurrentTick()

int ksceRtcSetCurrentTick ( SceRtcTick *  tick)

◆ ksceRtcGetCurrentTick()

int ksceRtcGetCurrentTick ( SceRtcTick *  tick)

◆ ksceRtcGetCurrentClock()

int ksceRtcGetCurrentClock ( 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.

◆ ksceRtcGetCurrentClockLocalTime()

int ksceRtcGetCurrentClockLocalTime ( SceDateTime *  time)

Get current real time clock time with system time zone.

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

◆ ksceRtcSetCurrentNetworkTick()

int ksceRtcSetCurrentNetworkTick ( SceRtcTick *  tick)

◆ ksceRtcGetCurrentNetworkTick()

int ksceRtcGetCurrentNetworkTick ( SceRtcTick *  tick)

◆ ksceRtcSetCurrentSecureTick()

int ksceRtcSetCurrentSecureTick ( SceRtcTick *  tick)

◆ ksceRtcGetCurrentSecureTick()

int ksceRtcGetCurrentSecureTick ( SceRtcTick *  tick)

◆ ksceRtcSetCurrentDebugNetworkTick()

int ksceRtcSetCurrentDebugNetworkTick ( SceRtcTick *  tick)

◆ ksceRtcGetCurrentDebugNetworkTick()

int ksceRtcGetCurrentDebugNetworkTick ( SceRtcTick *  tick)

◆ ksceRtcConvertTickToDateTime()

int ksceRtcConvertTickToDateTime ( SceDateTime *  dst,
SceRtcTick *  src 
)

Convert tick to date time.

Parameters
[out]dst- The output SceDateTime struct pointer.
[in]src- The input tick pointer.
Returns
0 on success, < 0 on error.

◆ ksceRtcConvertDateTimeToUnixTime()

int ksceRtcConvertDateTimeToUnixTime ( const SceDateTime *  src,
SceUInt64 *  dst 
)

Convert date time to unix time.

Parameters
[in]src- The input SceDateTime struct pointer.
[out]dst- The output unix time buffer pointer.
Returns
0 on success, < 0 on error.

◆ ksceRtcFormatRFC3339()

int ksceRtcFormatRFC3339 ( char *  date_time,
const SceRtcTick *  utc,
int  time_zone_minutes 
)

Format an RTC tick as an RFC 3339 timestamp.

FW 3.60 writes YYYY-MM-DDThh:mm:ss.ffZ for UTC, or YYYY-MM-DDThh:mm:ss.ff+hh:mm / -hh:mm for a nonzero offset. The fractional field contains hundredths of a second, truncated from the tick's microseconds. The output buffer must hold at least 29 bytes.

Parameters
[out]date_time- Output string buffer.
[in]utc- UTC tick to format, or NULL to use the current tick.
[in]time_zone_minutes- Signed UTC offset in minutes, from -1439 through 1439.
Returns
0 on success, SCE_RTC_ERROR_INVALID_POINTER when date_time is NULL, or SCE_RTC_ERROR_INVALID_VALUE for an invalid offset or adjusted tick.

◆ ksceRtcGetAccumulativeTime()

SceULong64 ksceRtcGetAccumulativeTime ( void  )

Return the accumulated system-time counter in microseconds.

FW 3.60 combines the current kernel system time with RTC/Syscon baselines so wall-clock adjustments and system-time rebasing do not reset this counter. The function has no error return. Before RTC initialization, it returns the current kernel system time.