ssSetNeedAbsoluteTime

Specify if a block should use absolute time

Syntax

void ssSetNeedAbsoluteTime(SimStruct *S, Boolean n)

Arguments

S

SimStruct representing an S-Function block.

n

Boolean flag indicating whether the block must use absolute time.

Description

Use in mdlInitializeSizes or mdlInitializeSampleTimes to specify whether the block needs to use the absolute time instead of elapsed time.

Languages

C, C++

Example

static void mdlInitializeSampleTimes(SimStruct *S)
{
    ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME);
    ssSetOffsetTime(S, 0, 0.0);
    ssSetNeedAbsoluteTime(S, 1);
   
   ssSetModelReferenceSampleTimeDefaultInheritance(S);
}
Introduced before R2006a