haiku/headers/private/kernel/arch/real_time_clock.h
Ingo Weinhold 09bb4e9ac5 The real_time_data structure contains an architecture specific
substructure now (that's the only member actually). The system time
offset is therefore accessed via architecture specific accessor
functions.
Note, that this commit breaks the PPC build. Since I want to rename at
least one file I've already changed, I can't avoid that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 02:17:59 +00:00

39 lines
970 B
C

/*
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de
* Copyright 2003, Jeff Ward, jeff@r2d2.stcloudstate.edu. All rights reserved.
*
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_ARCH_REAL_TIME_CLOCK_H
#define KERNEL_ARCH_REAL_TIME_CLOCK_H
#include <kernel.h>
struct kernel_args;
struct real_time_data;
#ifdef __cplusplus
extern "C" {
#endif
status_t arch_rtc_init(struct kernel_args *args, struct real_time_data *data);
void arch_rtc_set_hw_time(uint32 seconds);
// Set HW clock to 'seconds' since 1/1/1970
uint32 arch_rtc_get_hw_time(void);
// Returns number of seconds since 1/1/1970 as stored in HW
void arch_rtc_set_system_time_offset(struct real_time_data *data,
bigtime_t offset);
// Set the system time offset in data.
bigtime_t arch_rtc_get_system_time_offset(struct real_time_data *data);
// Return the system time offset as stored in data.
#ifdef __cplusplus
}
#endif
#endif /* KERNEL_ARCH_REAL_TIME_CLOCK_H */