diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-27 21:32:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-02 07:46:16 +0200 |
commit | 3888771772a57b4c924e1987e603e7a1b957e07c (patch) | |
tree | 7381df5727980502ce30d913149d5750c0ef7496 /cpukit/score/include/rtems/score/todimpl.h | |
parent | score: _Objects_Get_name_as_string() (diff) | |
download | rtems-3888771772a57b4c924e1987e603e7a1b957e07c.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/include/rtems/score/todimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/todimpl.h | 25 |
1 files changed, 9 insertions, 16 deletions
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 ); } /** |