diff options
Diffstat (limited to 'spec/if/rtems/clock/tick-before.yml')
-rw-r--r-- | spec/if/rtems/clock/tick-before.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/if/rtems/clock/tick-before.yml b/spec/if/rtems/clock/tick-before.yml new file mode 100644 index 00000000..52f4ba3c --- /dev/null +++ b/spec/if/rtems/clock/tick-before.yml @@ -0,0 +1,40 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns true if the current ticks counter value indicates a time before the + time specified by the tick value and false otherwise. +copyrights: +- Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: | + return (${/if/c/int32_t:/name}) ( ${.:/params[0]/name} - ${/if/impl/watchdog/ticks-since-boot:/name} ) > 0; + params: + - ${../types/interval:/name} ${.:/params[0]/name} + return: ${/if/c/bool:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: /groups/api/classic/clock +name: rtems_clock_tick_before +notes: | + This directive can be used to write busy loops with a timeout. +params: +- description: is the tick value. + dir: null + name: tick +return: + return: null + return-values: + - description: | + The current ticks counter value indicates a time before the time + specified by the tick value. + value: "true" + - description: | + Otherwise. + value: "false" +type: interface |