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
This commit is contained in:
@@ -15,16 +15,6 @@
|
|||||||
static bigtime_t sBootTime;
|
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. */
|
/** Write the system time to CMOS. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -95,3 +85,25 @@ rtc_init(kernel_args *ka)
|
|||||||
return B_OK;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user