Function that returns the time at which the sampling needs to start.
This function takes as arguments the sampling interval and the current time. It returns the time at which the sampling will start. The start of the sampling will be such that a sample instant coincides with t=0.
function sampleStart extends Modelica.Icons.Function; input Modelica.Units.SI.Time t "Simulation time"; input Modelica.Units.SI.Time samplePeriod "Sample Period"; output Modelica.Units.SI.Time sampleStart "Time at which first sample happens"; end sampleStart;