Documentation

ssGetTFinal

Get the simulation stop time

Syntax

time_T ssGetTFinal(SimStruct *S)

Arguments

S

SimStruct representing an S-Function block.

Returns

A value of typetime_T.

Description

Use to query the stop time of the current simulation. Seematlabroot/extern/include/tmwtypes.hfor a description of thetime_Tdata type.

For noninlined S-Function blocks, this function behaves in the following ways:

  • For simulation,ssGetTFinalreturns the value of Stop time.

  • For code generation,

    • If generation terminates at Stop time,ssGetTFinalreturns the value of Stop time.

    • When the Stop time isinf,ssGetTFinalreturns the value of —1.

    • If the generated code runs indefinitely and regardless of the value of Stop time,ssGetTFinalreturns the value of —1.

语言

C, C++

See Also

ssGetT,ssGetTStart

Introduced before R2006a