This is a static copy of a profile report

Home

blinktxt>blinkcallback (29 calls, 0.078 sec)
Generated 15-Mar-2007 12:01:51 using real time.
M-subfunction in file c:\mind07\blinktxt.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
timer.timercbM-function29
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
72
drawnow
140.063 s80.0%
70
set(txt,'String','')
140.016 s20.0%
80
end
20 s0%
79
delete(tmr)
20 s0%
78
stop(tmr)
20 s0%
Other lines & overhead  0 s0%
Totals  0.078 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
timer.stopM-function20 s0%
timer.deleteM-function20 s0%
Self time (built-ins, overhead, etc.)  0.078 s100.0%
Totals  0.078 s100% 
M-Lint results
Line numberMessage
45Input variable 'evd' appears never to be used.
Coverage results
[ Show coverage for parent directory ]
Total lines in file36
Non-code lines (comments, blank lines)22
Code lines (lines that can run)14
Code lines that did run14
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
45 function blinkcallback(tmr,evd,txt)
46 %BLINKCALLBACK callback function to create blinking effect
47
48 % when you use a cell array with a function handle to set the TimerFcn
49 % callback, the first two inputs will always be the handle for the timer
50 % and event data, in that order. Any additional elements in the cell array
51 % will become the third, fourth, fifth, etc. inputs
52
53 % use a try/catch block, if the figure is closed, and txt becomes an
54 % invalid handle, this will catch the error when you try to GET the String
55 % for txt
56
29 57 try
58 % check the current String value
29 59 str = get(txt,'String');
60
27 61 if isempty(str)
62 % get the stored string
13 63 str = get(txt,'UserData');
64 % use the stored string to restore the string
13 65 set(txt,'String',str);
66 % force MATLAB to redraw the figure
13 67 drawnow
14 68 else
69 % set to an empty string, to make it 'blink'
0.02 14 70 set(txt,'String','')
71 % force MATLAB to redraw the figure
0.06 14 72 drawnow
14 73 end
2 74 catch
75 % if there was an error, stop and delete the timer
76 % an error will occur if the figure is closed, since 'txt' will not be
77 % a valid handle anymore.
2 78 stop(tmr)
2 79 delete(tmr)
2 80 end