KallistiOS  2.0.0
rtc.h
Go to the documentation of this file.
1 /* KallistiOS 2.0.0
2
3  arch/dreamcast/include/rtc.h
4  (c)2000-2001 Dan Potter
5
6 */
7
8 /** \file arch/rtc.h
9  \brief Low-level real time clock functionality.
10
11  This file contains functions for interacting with the real time clock in the
12  Dreamcast. Generally, you should prefer interacting with the higher level
13  standard C functions, like time(), rather than these.
14
15  \author Dan Potter
16 */
17
18 #ifndef __ARCH_RTC_H
19 #define __ARCH_RTC_H
20
21 #include <sys/cdefs.h>
22 __BEGIN_DECLS
23
24 #include <time.h>
25
26 /** \brief Get the current date/time.
27
28  This function retrieves the current RTC value as a standard UNIX timestamp
29  (with an epoch of January 1, 1970 00:00). This is assumed to be in the
30  timezone of the user (as the RTC does not support timezones).
31
32  \return The current UNIX-style timestamp (local time).
33 */
34 time_t rtc_unix_secs();
35
36 /** \brief Get the time that the sytem was booted.
37
38  This function retrieves the RTC value from when KallistiOS was started. As
39  with rtc_unix_secs(), this is a UNIX-style timestamp in local time.
40
41  \return The boot time as a UNIX-style timestamp.
42 */
43 time_t rtc_boot_time();
44
45 /* \cond */
46 /* Init / Shutdown */
47 int rtc_init();
48 void rtc_shutdown();
49 /* \endcond */
50
51 __END_DECLS
52
53 #endif /* __ARCH_RTC_H */
54