%implements "sfun_tstart" "C"
%function BlockInstanceSetup(block,system) void
%<LibBlockSetIsExpressionCompliant(block)>
%endfunction
%function BlockOutputSignal(block,system,portIdx,ucv,lcv,idx,retType) void
%switch retType
%case "Signal"
%if ISEQUAL(CodeFormat,"S-Function")
%return "ssGetTStart(%<tSimStruct>)"
%else
%if isRSim || IsSimstructBasedTarget()
%return "%<StartTime>"
%else
%return "(0.0)"
%endif
%endif
%default
%assign errTxt = "Unsupported return type: %<retType>"
%<LibBlockReportError(block,errTxt)>
%endswitch
%endfunction
%function Outputs(block, system) Output
%if ISEQUAL(CodeFormat,"S-Function")
%assign TStart = "ssGetTStart(%<tSimStruct>)"
%else
%if isRSim || IsSimstructBasedTarget()
%assign TStart = "%<StartTime>"
%else
%assign TStart = "(0.0)"
%endif
%endif
/* %<Type> Block (%<ParamSettings.FunctionName>): %<Name> */
%<LibBlockOutputSignal(0, "", "", 0)> = %<TStart>;
%endfunction