Mercurial > hg > octave-nkf
diff scripts/miscellaneous/toc.m @ 3106:21208b797332
[project @ 1997-11-19 06:26:03 by jwe]
author | jwe |
---|---|
date | Wed, 19 Nov 1997 06:26:04 +0000 |
parents | 04119d7a7d84 |
children | 02866242d3ae |
line wrap: on
line diff
--- a/scripts/miscellaneous/toc.m +++ b/scripts/miscellaneous/toc.m @@ -32,13 +32,13 @@ warning ("toc: ignoring extra arguments"); endif - global __tic_toc_timestamp__; + global __tic_toc_timestamp__ = -1; - if (exist ("__tic_toc_timestamp__")) - secs = etime (clock (), __tic_toc_timestamp__); - else + if (__tic_toc_timestamp__ < 0) warning ("toc called before timer set"); secs = []; + else + secs = etime (clock (), __tic_toc_timestamp__); endif endfunction