CODES / common / time
Display time in a user friendly format
Contents
Syntax
- CODES.common.time(sec) displays a time in seconds sec in an appropriate format
Example
- Display 3947654 s in a more readable format
disp(CODES.common.time(3947654));
45 d 16 h 34 m 14 s
- Display elapsed time during a dummy loop
tic;p=0; for i=1:1e7 p=p+i; end disp(CODES.common.time(toc));
8s
See also
Copyright © 2015 Computational Optimal Design of Engineering Systems (CODES) Laboratory. University of Arizona.
Computational Optimal Design of Engineering Systems |