summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/timespec.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-12-24 16:38:42 +1100
committerChris Johns <chrisj@rtems.org>2013-12-24 16:46:19 +1100
commit2d1bdc8f797db5ab6e3ba6945befaf73d9062798 (patch)
treee8a3eecc64c589a9d0495790e09092dc572f36cf /cpukit/score/include/rtems/score/timespec.h
parentmips/shared: added new doxygen (diff)
downloadrtems-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/timespec.h')
-rw-r--r--cpukit/score/include/rtems/score/timespec.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/timespec.h b/cpukit/score/include/rtems/score/timespec.h
index e72ccb2b72..8dd1853511 100644
--- a/cpukit/score/include/rtems/score/timespec.h
+++ b/cpukit/score/include/rtems/score/timespec.h
@@ -89,6 +89,21 @@ extern "C" {
((_time)->tv_nsec)
/**
+ * @brief Get the timestamp as nanoseconds.
+ *
+ * This method returns the timestamp as nanoseconds.
+ *
+ * @param[in] time points to the timestamp.
+ * @param[in] nanoseconds the nanoseconds since the last tick.
+ *
+ * @retval The time in nanoseconds.
+ */
+uint64_t _Timespec_Get_As_nanoseconds(
+ const struct timespec *time,
+ const uint32_t nanoseconds
+);
+
+/**
* @brief Check if timespec is valid.
*
* This method determines the validity of a timespec.