1 /* 2 ** Copyright 2003, Jeff Ward, jeff@r2d2.stcloudstate.edu. All rights reserved. 3 ** Distributed under the terms of the Haiku License. 4 */ 5 #ifndef _KERNEL_REAL_TIME_CLOCK_H 6 #define _KERNEL_REAL_TIME_CLOCK_H 7 8 9 #include <KernelExport.h> 10 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 status_t rtc_init(kernel_args *args); 17 bigtime_t rtc_boot_time(void); 18 // Returns the time at which the system was booted in microseconds since Jan 1, 1970 UTC. 19 20 typedef struct rtc_info { 21 uint32 time; 22 bool is_gmt; 23 int32 tz_minuteswest; 24 bool tz_dsttime; 25 } rtc_info; 26 27 status_t get_rtc_info(rtc_info *info); 28 29 bigtime_t _user_system_time(void); 30 status_t _user_set_real_time_clock(uint32 time); 31 status_t _user_set_timezone(int32 timezoneOffset, bool daylightSavingTime); 32 status_t _user_set_tzfilename(const char* filename, size_t length, bool isGMT); 33 status_t _user_get_tzfilename(char *filename, size_t length, bool *_isGMT); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif /* _KERNEL_REAL_TIME_CLOCK_H */ 40