title: How can I build a timer to count the total time of when my signal is on during the simulation?
body: <p>I have a boolean signal that varies between 1 and 0. How can I build a subsystem in Simulink to count the total time during the simulation that the signal is on? </p>
  
  <p>I am using Matlab 2019a.</p>