From 96ec8ee80a18502c2159497e821df3fcd0dc7411 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 22 Aug 2014 17:09:36 +0200 Subject: rtems: Add more clock tick functions Add rtems_clock_tick_later(), rtems_clock_tick_later_usec() and rtems_clock_tick_before(). --- doc/user/clock.t | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) (limited to 'doc/user') 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 @@ -613,6 +616,107 @@ 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 - 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 -- cgit v1.2.3