| MATLAB Function Reference | ![]() |
c = clock
c = clock returns a 6-element date vector containing the current date and time in decimal form:
c = [year month day hour minute seconds]
The first five elements are integers. The seconds element is accurate to several digits beyond the decimal point. The statement fix(clock) rounds to integer display format.
When timing the duration of an event, use the tic and toc functions instead of clock or etime. These latter two functions are based on the system time which can be adjusted periodically by the operating system and thus might not be reliable in time comparison operations.
cputime, datenum, datevec, etime, tic, toc
![]() | clipboard | close | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |