KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
rtc.h File Reference

Low-level real time clock functionality. More...

#include <sys/cdefs.h>
#include <time.h>

Go to the source code of this file.

Functions

time_t rtc_unix_secs ()
 Get the current date/time. More...
 
time_t rtc_boot_time ()
 Get the time that the sytem was booted. More...
 

Detailed Description

Low-level real time clock functionality.

This file contains functions for interacting with the real time clock in the Dreamcast. Generally, you should prefer interacting with the higher level standard C functions, like time(), rather than these.

Author
Dan Potter

Function Documentation

time_t rtc_boot_time ( )

Get the time that the sytem was booted.

This function retrieves the RTC value from when KallistiOS was started. As with rtc_unix_secs(), this is a UNIX-style timestamp in local time.

Returns
The boot time as a UNIX-style timestamp.
time_t rtc_unix_secs ( )

Get the current date/time.

This function retrieves the current RTC value as a standard UNIX timestamp (with an epoch of January 1, 1970 00:00). This is assumed to be in the timezone of the user (as the RTC does not support timezones).

Returns
The current UNIX-style timestamp (local time).