This is a static copy of a profile reportHome
days2hms (123 calls, 0.000 sec)
Generated 05-Aug-2011 13:00:35 using cpu time.
function in file /home/LeechJ/cbass_analysis/matutils/dateconv/days2hms.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
23 | second = second - 60*minute; ... | 123 | 0 s | 0% |  |
22 | minute = fix(second/60); ... | 123 | 0 s | 0% |  |
21 | second = second - 3600*hour; ... | 123 | 0 s | 0% |  |
20 | hour = fix(second/3600); ... | 123 | 0 s | 0% |  |
19 | second = 86400 * days; | 123 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 23 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 6 |
Code lines that did run | 6 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function [hour, minute, second] = days2hms(days)
2 %DAYS2HMS Convert days into hours, minutes, and seconds.
3 %
4 % [HOUR, MINUTE, SECOND] = DAYS2HMS(DAYS) converts the number of days to
5 % hours, minutes, and seconds.
6 %
7 % The following holds (to within rounding precision):
8 %
9 % DAYS = HOUR / 24 + MINUTE / (24 * 60) + SECOND / (24 * 60 * 60)
10 % = (HOUR + (MINUTE + SECOND / 60) / 60) / 24
11
12 % Author: Peter J. Acklam
13 % Time-stamp: 2002-03-03 12:52:02 +0100
14 % E-mail: pjacklam@online.no
15 % URL: http://home.online.no/~pjacklam
16
123 17 error(nargchk(1, 1, nargin));
18
123 19 second = 86400 * days;
123 20 hour = fix(second/3600); % get number of hours
123 21 second = second - 3600*hour; % remove the hours
123 22 minute = fix(second/60); % get number of minutes
123 23 second = second - 60*minute; % remove the minutes