This is a static copy of a profile reportHome
timer.timercb (31 calls, 0.094 sec)
Generated 15-Mar-2007 12:01:51 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\iofun\@timer\timercb.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
timercb | M-function | 31 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
31 | feval(val{1}, obj, eventStruct... | 31 | 0.094 s | 100.0% |  |
32 | end | 31 | 0 s | 0% |  |
29 | end | 2 | 0 s | 0% |  |
28 | val = {val}; | 2 | 0 s | 0% |  |
27 | if isa(val, 'function_handle') | 31 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.094 s | 100% | |
Children (called functions)
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 51 |
Non-code lines (comments, blank lines) | 22 |
Code lines (lines that can run) | 29 |
Code lines that did run | 11 |
Code lines that did not run | 18 |
Coverage (did run/can run) | 37.93 % |
Function listing
time calls line
1 function timercb(obj,type,val,event)
2 %TIMERCB Wrapper for timer object M-file callback.
3 %
4 % TIMERCB(OBJ,TYPE,VAL,EVENT) calls the function VAL with parameters
5 % OBJ and EVENT. This function is not intended to be called by the
6 % user.
7 %
8 % See also TIMER
9 %
10
11 % RDD 12-2-01
12 % Copyright 2001-2005 The MathWorks, Inc.
13 % $Revision: 1.2.4.5 $ $Date: 2005/06/21 19:34:59 $
14
31 15 if ~isvalid(obj)
16 return;
17 end
31 18 try
31 19 if isa(val,'char') % strings are evaled in base workspace.
20 evalin('base',val);
31 21 else % non-strings are fevaled with calling object and event struct as parameters
22 % Construct the event structure. The callback is expected to be of cb(obj,event,...) format
31 23 eventStruct = struct(event);
31 24 eventStruct.Data = struct(eventStruct.Data);
25
26 % make sure val is a cell / only not a cell if user specified a function handle as callback.
31 27 if isa(val, 'function_handle')
2 28 val = {val};
2 29 end
30 % Execute callback function.
0.09 31 31 feval(val{1}, obj, eventStruct, val{2:end});
31 32 end
33 catch
34 lerrInfo = lasterror;
35 if ~ strcmp(type,'ErrorFcn') && isJavaTimer(obj.jobject)
36 try
37 obj.jobject.callErrorFcn(lerrInfo.message,lerrInfo.identifier);
38 catch
39 end
40 end
41 %Error message is coming from Callback specified by the user. We
42 %will provide the stack information in this case. (To be retrieved
43 %by call to lasterror).
44 lerrInfo.message = timererror('MATLAB:timer:badcallback',type, ...
45 get(obj,'Name'));
46 lerrInfo.identifier = 'MATLAB:timer:badcallback';
47 nStack = length(lerrInfo.stack)-length(dbstack);
48 lerrInfo.stack = lerrInfo.stack(1:nStack);
49 lasterror(lerrInfo);
50 disp(lasterr);
51 end