From 3888771772a57b4c924e1987e603e7a1b957e07c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 27 Apr 2016 21:32:23 +0200 Subject: score: Streamline set time of day functions Rename _TOD_Set() into _TOD_Set_with_timespec(). Rename _TOD_Set_with_timestamp() into _TOD_Set(). This is now in line with _TOD_Get() and _TOD_Get_as_timespec(). The timestamp is the canonical format. --- cpukit/score/include/rtems/score/todimpl.h | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'cpukit/score/include/rtems/score/todimpl.h') diff --git a/cpukit/score/include/rtems/score/todimpl.h b/cpukit/score/include/rtems/score/todimpl.h index b1f8a6d6b6..2b07823e14 100644 --- a/cpukit/score/include/rtems/score/todimpl.h +++ b/cpukit/score/include/rtems/score/todimpl.h @@ -143,30 +143,23 @@ typedef struct { extern TOD_Control _TOD; /** - * @brief Sets the time of day from timestamp. + * @brief Sets the time of day. * - * The @a tod_as_timestamp timestamp represents the time since UNIX epoch. - * The watchdog seconds chain will be adjusted. - * - * @param[in] tod_as_timestamp is the constant of the time of day as a timestamp + * @param tod_as_timestamp The new time of day in timestamp format representing + * the time since UNIX Epoch. */ -void _TOD_Set_with_timestamp( +void _TOD_Set( const Timestamp_Control *tod_as_timestamp ); /** - * @brief Sets the time of day from timespec. - * - * The @a tod_as_timestamp timestamp represents the time since UNIX epoch. - * The watchdog seconds chain will be adjusted. + * @brief Sets the time of day with timespec format. * - * In the process the input given as timespec will be transformed to FreeBSD - * bintime format to guarantee the right format for later setting it with a - * timestamp. + * @param tod_as_timespec The new time of day in timespec format. * - * @param[in] tod_as_timespec is the constant of the time of day as a timespec + * @see _TOD_Set(). */ -static inline void _TOD_Set( +static inline void _TOD_Set_with_timespec( const struct timespec *tod_as_timespec ) { @@ -177,7 +170,7 @@ static inline void _TOD_Set( tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); - _TOD_Set_with_timestamp( &tod_as_timestamp ); + _TOD_Set( &tod_as_timestamp ); } /** -- cgit v1.2.3