OSA : OS_Ttimer_IsRun

bool OS_Ttimer_IsRun ()

Service uses system timerAllowed only in task and functions called by task

Check if current task's timer is running.

To use task timers you need to define OS_ENABLE_TTIMERS in OSAcfg.h. Size of current task's timers is set by OS_TTIMER_SIZE constant

Call allowed:

Allowed only in task and functions called by task (any depth)

Parameters:

no

Returns:

false timer is stopped or paused
true timer is running

Example:

void Task (void)
{
    for (;;) {
        /*...*/
        if (!OS_Ttimer_IsRun())     // if timer is not running
            OS_Ttimer_Run(100);     // then run it
        /*...*/
    }
}

See also