OSA : OS_IsTimeout

bool OS_IsTimeout ()

Uses timer

Return true if previous service exited with timeout.

Call allowed:

Everywhere

Parameters:

None

Returns:

false event occurred before timeout expired
true timeout expired before event occurred

Example:

void Task (void)
{
    for (;;) {
        /*...*/
        OS_Wait_TO(RB0 == 1, 100);
        if (!OS_IsTimeout()) {
            //
            /*...*/
        }
        /*...*/
    }
}

See also