diff options
author | Chris Johns <chrisj@rtems.org> | 2013-12-24 16:38:42 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-12-24 16:46:19 +1100 |
commit | 2d1bdc8f797db5ab6e3ba6945befaf73d9062798 (patch) | |
tree | e8a3eecc64c589a9d0495790e09092dc572f36cf /cpukit/score/include/rtems/score/timestamp.h | |
parent | mips/shared: added new doxygen (diff) | |
download | rtems-2d1bdc8f797db5ab6e3ba6945befaf73d9062798.tar.bz2 |
cpukit/rtems: Add rtems_clock_get_uptime_nanoseconds to the RTEMS API.
Add Timestamp support in the score to return a timestamp in nanoseconds.
Add a test.
Update the RTEMS API documentation.
Diffstat (limited to 'cpukit/score/include/rtems/score/timestamp.h')
-rw-r--r-- | cpukit/score/include/rtems/score/timestamp.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/timestamp.h b/cpukit/score/include/rtems/score/timestamp.h index 638ae7bf52..b920e69d47 100644 --- a/cpukit/score/include/rtems/score/timestamp.h +++ b/cpukit/score/include/rtems/score/timestamp.h @@ -330,6 +330,23 @@ extern "C" { #endif /** + * @brief Get the timestamp as nanoseconds. + * + * This method returns the timestamp as nanoseconds. + * + * @param[in] _time points to the timestamp + * + * @retval The time in nanoseconds. + */ +#if CPU_TIMESTAMP_USE_STRUCT_TIMESPEC == TRUE + #define _Timestamp_Get_As_nanoseconds( _timestamp, _nanoseconds ) \ + _Timespec_Get_As_nanoseconds( _timestamp, _nanoseconds ) +#else + #define _Timestamp_Get_As_nanoseconds( _timestamp, _nanoseconds ) \ + _Timestamp64_Get_As_nanoseconds( _timestamp, _nanoseconds ) +#endif + +/** * @brief Convert timestamp to struct timespec. * * This method returns the seconds portion of the specified @a _timestamp. |