====== OSA : OS_Ttimer_Delay ======
**OS_Ttimer_Delay (delay)**\\
=== ===
{{osa:ref:attr_call_to.png|Service uses system timer}}{{osa:ref:attr_call_task.png|Allowed only in task}}{{osa:ref:attr_call_ct_sw.png|Switches contexts}}
Delay current task using current task's timer. (Same as ##[[en:osa:ref:allservices:OS_Delay|OS_Delay]]##())
To use task timers you need to define ##[[en:osa:ref:appendix:configuration#Timer control|OS_ENABLE_TTIMERS]]## in ##[[en:osa:ref:appendix:configuration|OSAcfg.h]]##. Size of current task's timers is set by ##[[en:osa:ref:appendix:configuration#Data types|OS_TTIMER_SIZE]]## constant
=== Call allowed: ===
Allowed only in task
=== Parameters: ===
{| class = "fpl"
|-
|//''delay''//
|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_Ttimer_Delay (20); // Delay current task for 20 system ticks.
/*...*/
}
}
=== See also ===
* [[en:osa:ref:allservices:OS_Ttimer_Run|OS_Ttimer_Run]]
* [[en:osa:ref:allservices:OS_Ttimer_Break|OS_Ttimer_Break]]
* [[en:osa:ref:allservices:OS_Ttimer_Wait|OS_Ttimer_Wait]]
* [[en:osa:ref:allservices:OS_Ttimer_Delay|OS_Ttimer_Delay]]
* [[en:osa:ref:allservices:OS_Ttimer_Get|OS_Ttimer_Get]]
* [[en:osa:ref:allservices:OS_Ttimer_Check|OS_Ttimer_Check]]
* [[en:osa:ref:allservices:OS_Ttimer_IsRun|OS_Ttimer_IsRun]]
* [[en:osa:ref:allservices:OS_Ttimer_Pause|OS_Ttimer_Pause]]
* [[en:osa:ref:allservices:OS_Ttimer_Continue|OS_Ttimer_Continue]]
----
* [[en:osa:ref:services:alphabetical|Alphabetical]]
* [[en:osa:ref:services:brieflist|All services]]
~~UP~~