diff options
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/clock.h')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/clock.h | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h index 2a1c77251f..989bf2f5c9 100644 --- a/cpukit/rtems/include/rtems/rtems/clock.h +++ b/cpukit/rtems/include/rtems/rtems/clock.h @@ -14,7 +14,6 @@ * * - set the current date and time * - obtain the current date and time - * - set the nanoseconds since last clock tick handler * - announce a clock tick * - obtain the system uptime */ @@ -35,6 +34,7 @@ #include <rtems/rtems/status.h> #include <rtems/rtems/types.h> #include <rtems/config.h> +#include <rtems/score/timecounterimpl.h> #include <sys/time.h> /* struct timeval */ @@ -69,12 +69,6 @@ typedef enum { } rtems_clock_get_options; /** - * Type for the nanoseconds since last tick BSP extension. - */ -typedef TOD_Nanoseconds_since_last_tick_routine - rtems_nanoseconds_extension_routine; - -/** * @brief Obtain Current Time of Day * * @deprecated rtems_clock_get() is deprecated. Use the more explicit @@ -279,24 +273,6 @@ rtems_status_code rtems_clock_set( rtems_status_code rtems_clock_tick( void ); /** - * @brief Set the BSP specific Nanoseconds Extension - * - * Clock Manager - * - * This directive sets the BSP provided nanoseconds since last tick - * extension. - * - * @param[in] routine is a pointer to the extension routine - * - * @return This method returns RTEMS_SUCCESSFUL if there was not an - * error. Otherwise, a status code is returned indicating the - * source of the error. - */ -rtems_status_code rtems_clock_set_nanoseconds_extension( - rtems_nanoseconds_extension_routine routine -); - -/** * @brief Obtain the System Uptime * * This directive returns the system uptime. @@ -328,7 +304,10 @@ void rtems_clock_get_uptime_timeval( struct timeval *uptime ); * * @retval The system uptime in seconds. */ -time_t rtems_clock_get_uptime_seconds( void ); +RTEMS_INLINE_ROUTINE time_t rtems_clock_get_uptime_seconds( void ) +{ + return _Timecounter_Time_uptime - 1; +} /** * @brief Returns the system uptime in nanoseconds. |