Get one of an S-function's sample times.
time_T ssGetSampleTime(SimStruct *S, int_T sti);
Use to obtain the sample time of S corresponding to the sample time index sti. See matlabroot/extern/include/tmwtypes.h for a description of the time_T data type.
Note Using ssGetSampleTime for computations can make your S-function sample time dependent. Use ssSetModelReferenceSampleTimeDisallowInheritance so that Simulink® displays an error when your S-function is used in an inappropriate context.
The following statement
time_T t = ssGetSampleTime(S, 0);
returns the S-function's current sample time.