time_source_stop

This function stops the given Time Source and resets its timer. You cannot stop a Time Source that has either not started, or is in a finished state.

 

Syntax:

time_source_stop(id);

ArgumentTypeDescription
idTime SourceThe Time Source to stop

 

Returns:

N/A

 

Example:

if (time_source_get_state(time_source) != time_source_state_stopped)
{
    time_source_stop(time_source);
}

The code above will stop a Time Source when it's not already stopped.