title: Access to CPU time during simulink?
body: <p>I need to run simulink and set a timeout and a penalty on time out. Hence, I need a block to give me the CPU time (real world time).</p>
  
  <p><a href="https://i.stack.imgur.com/9cRer.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9cRer.png" alt="Real world time"></a></p>
  
  <p>The clock block gives the simulation time:</p>
  
  <p><a href="https://i.stack.imgur.com/SUktW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SUktW.png" alt="Simulink Clock block"></a></p>
  
  <p>The CAN timeout detection is discrete and it does not work with my continuous solver.</p>
  
  <p><a href="https://i.stack.imgur.com/ibOhv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ibOhv.png" alt="Simulink CAN timeout"></a></p>
  
  <p>The Matlab function blocks make simulation so slow.</p>
  
  <p>Is there any alternative?</p>