ssSetNeedAbsoluteTime
Register if a block requires absolute time
Syntax
void ssSetNeedAbsoluteTime(SimStruct *S, Boolean n)
Arguments
S
SimStruct that represents an S-Function block.
n
Boolean flag indicating whether the block must use absolute time.
1
registers that the block requires absolute time.
Description
Use in mdlInitializeSizes
or
mdlInitializeSampleTimes
to register whether the block needs
to use the absolute time and allocate an absolute time counter for the rate at which
the s-function executes.
Languages
C, C++
Examples
static void mdlInitializeSampleTimes(SimStruct *S) { ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME); ssSetOffsetTime(S, 0, 0.0); ssSetNeedAbsoluteTime(S, 1); ssSetModelReferenceSampleTimeDefaultInheritance(S); }
See Also
Version History
Introduced before R2006a