diff options
author | Alexander Krutwig <alexander.krutwig@embedded-brains.de> | 2015-05-12 14:32:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-20 08:40:33 +0200 |
commit | 7cd2484c4cf9fc759b7205ed6d8adcc6d2c28ff6 (patch) | |
tree | dd60b6032354124d97233e7070506f09d1566832 /cpukit/rtems/include/rtems/rtems/clock.h | |
parent | timecounter: Port to RTEMS (diff) | |
download | rtems-7cd2484c4cf9fc759b7205ed6d8adcc6d2c28ff6.tar.bz2 |
timecounter: Use in RTEMS
Replace timestamp implementation with FreeBSD bintime and timecounters.
New test sptests/sptimecounter02.
Update #2271.
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. |