| 1 | function tictic(id) |
|---|
| 2 | % Similar to MATLAB's tic(), but extended to save "more states" |
|---|
| 3 | % |
|---|
| 4 | % Syntax |
|---|
| 5 | % |tictic(id)| |
|---|
| 6 | % |
|---|
| 7 | % Description |
|---|
| 8 | % |tictic(id)| will start tic command determined by a specific |id|. E.g. |
|---|
| 9 | % tictic(3) will not influence measurements of tictic(2). |
|---|
| 10 | % |
|---|
| 11 | % Note: |
|---|
| 12 | % Do not use too large values for |id|, as they will take up memory. Also |
|---|
| 13 | % make sure that you do not mix up those tictic ids. |
|---|
| 14 | % Note that toctoc() does not generate a screen output like toc() does. |
|---|
| 15 | % |
|---|
| 16 | % Example |
|---|
| 17 | %+ id = 7; |
|---|
| 18 | %+ tictic(id); |
|---|
| 19 | %+ % do something... |
|---|
| 20 | %+ timeTaken = toctoc(id); |
|---|
| 21 | % |
|---|
| 22 | % See also: toctoc |
|---|
| 23 | % |
|---|
| 24 | % Signature |
|---|
| 25 | % Author: Linus Atorf (see AUTHORS) |
|---|
| 26 | % Date: 2007/10/15 |
|---|
| 27 | % Copyright: 2007, RWTH Aachen University |
|---|
| 28 | % |
|---|
| 29 | ; |
|---|
| 30 | % |
|---|
| 31 | % *********************************************************************************************** |
|---|
| 32 | % * This file is part of the RWTH - Mindstorms NXT Toolbox. * |
|---|
| 33 | % * * |
|---|
| 34 | % * The RWTH - Mindstorms NXT Toolbox is free software: you can redistribute it and/or modify * |
|---|
| 35 | % * it under the terms of the GNU General Public License as published by the Free Software * |
|---|
| 36 | % * Foundation, either version 3 of the License, or (at your option) any later version. * |
|---|
| 37 | % * * |
|---|
| 38 | % * The RWTH - Mindstorms NXT Toolbox is distributed in the hope that it will be useful, * |
|---|
| 39 | % * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * |
|---|
| 40 | % * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
|---|
| 41 | % * * |
|---|
| 42 | % * You should have received a copy of the GNU General Public License along with the * |
|---|
| 43 | % * RWTH - Mindstorms NXT Toolbox. If not, see <http: |
|---|
| 44 | % *********************************************************************************************** |
|---|
| 45 | |
|---|
| 46 | global ticticStart; |
|---|
| 47 | ticticStart(id, :) = clock; |
|---|
| 48 | |
|---|
| 49 | end%function |
|---|