From 8da0ad81bf2cc8e034f3ae9f3d8c832c3ec03369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 24 Oct 2003 14:53:02 +0000 Subject: [PATCH] Removed rtc_set_system_time() and introduced the public Be kernel call set_real_time_clock(). I am not sure if this call is supposed to set the hardware clock. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5145 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/real_time_clock.c | 32 +++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/kernel/core/real_time_clock.c b/src/kernel/core/real_time_clock.c index 409216356c..a136cc2466 100644 --- a/src/kernel/core/real_time_clock.c +++ b/src/kernel/core/real_time_clock.c @@ -15,16 +15,6 @@ static bigtime_t sBootTime; -void -rtc_set_system_time(uint32 current_time) -{ - uint64 useconds; - - useconds = (uint64)current_time * 1000000; - sBootTime = useconds - system_time(); -} - - /** Write the system time to CMOS. */ static void @@ -95,3 +85,25 @@ rtc_init(kernel_args *ka) return B_OK; } + +// #pragma mark - +// public kernel API + + +void +set_real_time_clock(uint32 currentTime) +{ + sBootTime = currentTime * 1000000LL - system_time(); +} + + +// #pragma mark - +// public userland API + + +void +_user_set_real_time_clock(uint32 time) +{ + set_real_time_clock(time); +} +