Main Content

ssGetNeedElapseTime

Check if the S-function block has registered that it requires elapsed time

Since R2023b

Syntax

int_T ssGetNeedElapseTime(SimStruct *S)

Arguments

S

SimStruct that represents an S-Function block.

Returns

An int_T value of 1 if the block requires elapsed time and 0 if it does not require elapsed time.

Description

Use to determine if the s-function block has registered that it requires elapsed time.

Languages

C, C++

Examples

static void mdlOutputs( Simstruct *S, int_T tid)
{
   int_T isTimeElapsed = ssGetNeedElapsedTime(S);

   if (isTimeElapsed == 1)
   {
      ssPrintf("Using elapsed time");
   }
}

Version History

Introduced in R2023b