i've a question about pause(n) where n is the time in seconds.
The fragment code where i've the problem is this:
cycle = cycle+1;
cycleTotal(day+1) = cycle+1;
[time,minutes,hours,day] = timerFun(minutes,hours,day,toc);
in fact i use the 'Value' of ToggleButton, named pause, to stop the while cycle, but the pause(ttot) varies (i.e. 1 second or 20 seconds), obviously if the waiting time is short the ToggleButton 'Value' is checked frequently, otherwise if the waiting time is long when i push the ToggleButton on the GUI i must wait the end of pause before the while-cycle 'Value' is invoked.
Is there a trick to stop pause() function or other method to check the ToggleButton 'Value' independently from pause function?