%%============================================================================
%%Abstract:
%%UtilitiesformanagingTLCcompilestats.
%%
%%Copyright2010-2018TheMathWorks,Inc.
%%
 
 
%%The_COMPILESTATS_needstobecheckedsothatthisfilecanbeincluded
%%inotherTLCfileslikecommonsetup.tlcandgenmap.tlc
%if EXISTS("_COMPILESTATS_") == 0
%assign _COMPILESTATS_ = 1
 
%function SetCompileStatsEnabled() void
  %assign ::CompileStatsEnabled = ...
    (1 == CGMODEL_ACCESS("CompileStats.getCompileStatsEnabled"))
%endfunction
 
%%Function:SLibAddTLCCompileStatsCheckPoint()
%%Abstract:
%%AddsacheckpointtotheTLCcompilestats
%%
%function SLibAddTLCCompileStatsCheckPoint(aStartOrEnd, checkPointName) void
  %if (::CompileStatsEnabled == TLC_TRUE)
    %% Must enter a valid name for the checkpoint
    %assert !ISEMPTY(checkPointName)
    %assign err = CGMODEL_ACCESS("CompileStats.addTLCCompileStatsCheckPoint", ...
      "TLC", checkPointName, aStartOrEnd ? "start" : "end")
  %endif
%endfunction
%endif %% _COMPILESTATS_