버전 (3.68 KB) 작성자: David Gleich
An object oriented implementation of tic and toc for nested timing.
다운로드 수: 1.9K
업데이트 날짜: 2006/9/27

라이선스 없음

The tic and toc functions manipulate a single global time variable and are not suitable for internal function timing when external routines may also perform independent timing.

The timetic object rectifies this deficiency in Matlab and creates a proper object-oriented timing class.

t1 = timetic;
% compute
t2 = timetic;
% compute
% compute

The times reported by the two toc commands are precisely the times between the tic and toc commands.

Further, the timetic class extends the tic/toc paradigm by adding pause, start, and set operations to manipulate a timer.

tt = timetic;
% do some complicated output
start(t1); % restarts t1 without resetting the total elapsed time

인용 양식

David Gleich (2024). timetic (https://www.mathworks.com/matlabcentral/fileexchange/12422-timetic), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보