summaryrefslogtreecommitdiffstats
path: root/doc/user/clock.t
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-22 17:09:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-26 10:21:27 +0200
commit96ec8ee80a18502c2159497e821df3fcd0dc7411 (patch)
tree81bd5f826828e0f35330f279dd08f024cfbdeec1 /doc/user/clock.t
parentor1k/Makefile.am: libbsp_a_CPPFLAGS was defined twice (diff)
downloadrtems-96ec8ee80a18502c2159497e821df3fcd0dc7411.tar.bz2
rtems: Add more clock tick functions
Add rtems_clock_tick_later(), rtems_clock_tick_later_usec() and rtems_clock_tick_before().
Diffstat (limited to '')
-rw-r--r--doc/user/clock.t104
1 files changed, 104 insertions, 0 deletions
diff --git a/doc/user/clock.t b/doc/user/clock.t
index 921d1cbbe8..1e821adca2 100644
--- a/doc/user/clock.t
+++ b/doc/user/clock.t
@@ -21,6 +21,9 @@ the clock manager are:
@item @code{@value{DIRPREFIX}clock_get_seconds_since_epoch} - Get seconds since epoch
@item @code{@value{DIRPREFIX}clock_get_ticks_per_second} - Get ticks per second
@item @code{@value{DIRPREFIX}clock_get_ticks_since_boot} - Get current ticks counter value
+@item @code{@value{DIRPREFIX}clock_tick_later} - Get tick value in the future
+@item @code{@value{DIRPREFIX}clock_tick_later_usec} - Get tick value in the future in microseconds
+@item @code{@value{DIRPREFIX}clock_tick_before} - Is tick value is before a point in time
@item @code{@value{DIRPREFIX}clock_get_uptime} - Get time since boot
@item @code{@value{DIRPREFIX}clock_get_uptime_timeval} - Get time since boot in timeval format
@item @code{@value{DIRPREFIX}clock_get_uptime_seconds} - Get seconds since boot
@@ -617,6 +620,107 @@ This directive will not cause the running task to be preempted.
@c
@c
@page
+@subsection CLOCK_TICK_LATER - Get tick value in the future
+
+@subheading CALLING SEQUENCE:
+
+@ifset is-C
+@findex rtems_clock_tick_later
+@example
+rtems_interval rtems_clock_tick_later(
+ rtems_interval delta
+);
+@end example
+@end ifset
+
+@subheading DESCRIPTION:
+
+Returns the ticks counter value delta ticks in the future.
+
+@subheading NOTES:
+
+This directive is callable from an ISR.
+
+This directive will not cause the running task to be preempted.
+
+@c
+@c
+@c
+@page
+@subsection CLOCK_TICK_LATER_USEC - Get tick value in the future in microseconds
+
+@subheading CALLING SEQUENCE:
+
+@ifset is-C
+@findex rtems_clock_tick_later_usec
+@example
+rtems_interval rtems_clock_tick_later_usec(
+ rtems_interval delta_in_usec
+);
+@end example
+@end ifset
+
+@subheading DESCRIPTION:
+
+Returns the ticks counter value at least delta microseconds in the future.
+
+@subheading NOTES:
+
+This directive is callable from an ISR.
+
+This directive will not cause the running task to be preempted.
+
+@c
+@c
+@c
+@page
+@subsection CLOCK_TICK_BEFORE - Is tick value is before a point in time
+
+@subheading CALLING SEQUENCE:
+
+@ifset is-C
+@findex rtems_clock_tick_before
+@example
+rtems_interval rtems_clock_tick_before(
+ rtems_interval tick
+);
+@end example
+@end ifset
+
+@subheading DESCRIPTION:
+
+Returns true if the current ticks counter value indicates a time before the
+time specified by the tick value and false otherwise.
+
+@subheading NOTES:
+
+This directive is callable from an ISR.
+
+This directive will not cause the running task to be preempted.
+
+@subheading EXAMPLE:
+
+@example
+@group
+status busy( void )
+@{
+ rtems_interval timeout = rtems_clock_tick_later_usec( 10000 );
+
+ do @{
+ if ( ok() ) @{
+ return success;
+ @}
+ @} while ( rtems_clock_tick_before( timeout ) );
+
+ return timeout;
+@}
+@end group
+@end example
+
+@c
+@c
+@c
+@page
@subsection CLOCK_GET_UPTIME - Get the time since boot
@cindex clock get uptime