RosettaCodeData/Task/Handle-a-signal/MATLAB/handle-a-signal-2.m
2023-07-01 13:44:08 -04:00

14 lines
211 B
Matlab

function sigintHandle
k = 1;
tic
try
while true
pause(0.5)
fprintf('%d\n', k)
k = k+1;
end
catch me
toc
rethrow me
end
end