Instructions

357 C-Control Pro IDE
© 2013 Conrad Electronic
5.25.2 Thread_Delay
Thread Functions Example
Syntax
void Thread_Delay(word delay);
Sub Thread_Delay(delay As Word)
Description
With this function a thread will set to "sleep" for a specified time. After this time the thread is again ready for
execution. The waiting period is given in ticks that are created by Timer 2. If Timer 2 is set off or used for
other purposes, the mode of operation of Thread_Delay() is not defined.
Even if Thread_Delay() looks like any other wait function, you have to keep in mind that the
thread is not automatically executed after the waiting period. The thread is then ready for execution,
but it will not started until the next thread change.
Parameter
delay number of 10ms ticks that should be waited
5.25.3 Thread_Info
Thread Functions
Syntax
word Thread_Info(byte info);
Sub Thread_Info(info As Byte) As Word
Description
The function returns information about the calling thread. The info parameter defines what kind of informa-
tion is returned.
Parameter
info values:
TI_THREADNUM number of the calling thread
TI_STACKSIZE defined stack size
TI_CYCLES number of cycles before thread change
Return Parameter
info result