====== OSA : OS_Delay ====== **OS_Delay (delaytime)**\\ === === {{osa:ref:attr_call_task.png|Allowed only in task}}{{osa:ref:attr_call_ct_sw.png|Switches context}}{{osa:ref:attr_call_to.png|Uses timer}} Delay current task using internal task timer. Constant ##[[en:osa:ref:appendix:configuration#Timer control|OS_ENABLE_TTIMERS]]## must be defined in ##[[en:osa:ref:appendix:configuration|OSAcfg.h]]##. === Call allowed: === Only in task === Parameters: === {| class = "fpl" |- |//''delaytime''// |Time of delay. Set in system ticks - call ##[[en:osa:ref:allservices:OS_Timer|OS_Timer]]## periods |} === Returns: === nothing === Example: === void Task (void) { for (;;) { /*...*/ OS_Delay(100); // Delay task for 100 system ticks /*...*/ } } === See also === ---- * [[en:osa:ref:services:alphabetical|Alphabetical]] * [[en:osa:ref:services:brieflist|All services]] ~~UP~~