title: Break loop after designated length of time in Matlab
body: <p>I'm a bit confused by the tic function, but I'm not sure if there's something better for what I'm trying to do. In psuedo-Matlab:</p>
  
  <pre><code>startTime = tic
  
  while(true)
  
     #some_stochastic_process
  
     if(now - startTime &gt; RUNTIME)
       break;
     end
  end
  </code></pre>
  
  <p>But subsequent calls to tic will clobber the original time. Is there a way to access the current value of tic without overwriting it?</p>