📄 ticktock.m
字号:
function TickTock (delt, tickI)% Print the time every tickI seconds% Initialize with TickTock(delt), then call it without an argument% to increment the time by delt.% delt: Time increment between calls% tickI: Time interval between printouts (default 1 sec)% $Id: TickTock.m 1.2 2004/07/07 G.723.1-v2r1a $persistent tick toffs tincr tickIncrif (nargin > 0) tick = 0; toffs = 0; tincr = delt; if (nargin == 1) tickIncr = 1; else tickIncr = TickI; end returnendtoffs = toffs + tincr;if (toffs >= tick); fprintf ('Time: %d s\n', tick); while (toffs >= tick) tick = tick + tickIncr; endendreturn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -