now (Calls: 3, Time: 0.004 s)
Generated 18-May-2021 16:05:17 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/timefun/now.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| workspacefunc | function | 3 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 19 | t = datenum(clock); | 3 | 0.004 s | 97.0% | |
| All other lines | 0.000 s | 3.0% | |||
| Totals | 0.004 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| datenum | function | 3 | 0.003 s | 79.6% | |
| Self time (built-ins, overhead, etc.) | 0.001 s | 20.4% | |||
| Totals | 0.004 s | 100% |
| Total lines in function | 19 |
| Non-code lines (comments, blank lines) | 18 |
| Code lines (lines that can run) | 1 |
| Code lines that did run | 1 |
| Code lines that did not run | 0 |
| Coverage (did run/can run) | 100.00 % |
time | Calls | line | |
|---|---|---|---|
1 | function t = now() | ||
2 | %NOW Current date and time as date number. | ||
3 | % NOTE: NOW returns a serial date number representing the current time, | ||
4 | % but it is recommended that you use datetime values to represent points | ||
5 | % in time, and datetime('now') to capture the current time. | ||
6 | % | ||
7 | % T = NOW returns the current date and time as a serial date | ||
8 | % number. | ||
9 | % | ||
10 | % FLOOR(NOW) is the current date and REM(NOW,1) is the current time. | ||
11 | % DATESTR(NOW) is the current date and time as a character vector. | ||
12 | % | ||
13 | % See also DATETIME, DATE, DATENUM, DATESTR, CLOCK. | ||
14 | |||
15 | % Author(s): C.F. Garvin, 2-23-95 | ||
16 | % Copyright 1984-2020 The MathWorks, Inc. | ||
17 | |||
18 | % Clock representation of current time | ||
0.004 | 3 | 19 | t = datenum(clock); |
Other subfunctions in this file are not included in this listing.