time: Address review comments.
* Use ENOSYS not B_DONT_DO_THAT (thanks korli) * Use unsigned long not uint64 (thanks axeld)
This commit is contained in:
@@ -373,8 +373,8 @@ extern status_t convert_to_pthread(thread_id thread, pthread_t *_thread);
|
|||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
|
|
||||||
extern uint32 real_time_clock(void);
|
extern unsigned long real_time_clock(void);
|
||||||
extern void set_real_time_clock(uint64 secsSinceJan1st1970);
|
extern void set_real_time_clock(unsigned long secsSinceJan1st1970);
|
||||||
extern bigtime_t real_time_clock_usecs(void);
|
extern bigtime_t real_time_clock_usecs(void);
|
||||||
extern bigtime_t system_time(void);
|
extern bigtime_t system_time(void);
|
||||||
/* time since booting in microseconds */
|
/* time since booting in microseconds */
|
||||||
|
|||||||
@@ -123,13 +123,13 @@ set_real_time_clock_usecs(bigtime_t currentTime)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
set_real_time_clock(uint64 currentTime)
|
set_real_time_clock(unsigned long currentTime)
|
||||||
{
|
{
|
||||||
set_real_time_clock_usecs((bigtime_t)currentTime * 1000000);
|
set_real_time_clock_usecs((bigtime_t)currentTime * 1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32
|
unsigned long
|
||||||
real_time_clock(void)
|
real_time_clock(void)
|
||||||
{
|
{
|
||||||
return (arch_rtc_get_system_time_offset(sRealTimeData) + system_time())
|
return (arch_rtc_get_system_time_offset(sRealTimeData) + system_time())
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ __get_system_time_offset()
|
|||||||
// #pragma mark - public API
|
// #pragma mark - public API
|
||||||
|
|
||||||
|
|
||||||
uint32
|
unsigned long
|
||||||
real_time_clock(void)
|
real_time_clock(void)
|
||||||
{
|
{
|
||||||
return (__arch_get_system_time_offset(sRealTimeData) + system_time())
|
return (__arch_get_system_time_offset(sRealTimeData) + system_time())
|
||||||
@@ -60,7 +60,7 @@ real_time_clock_usecs(void)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
set_real_time_clock(uint64 secs)
|
set_real_time_clock(unsigned long secs)
|
||||||
{
|
{
|
||||||
_kern_set_real_time_clock((bigtime_t)secs * 1000000);
|
_kern_set_real_time_clock((bigtime_t)secs * 1000000);
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ set_timezone(const char* /*timezone*/)
|
|||||||
*
|
*
|
||||||
* TODO: should we keep this around for compatibility or get rid of it?
|
* TODO: should we keep this around for compatibility or get rid of it?
|
||||||
*/
|
*/
|
||||||
return B_DONT_DO_THAT;
|
return ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user