% FUNCTION CHRONO = CHRONO_START(N, [INTERVAL])
%
% To create a chrono object, used to chronometer a task.
%
% n: integer, total number of iterations to accomplish task.
% interval: float, minimum interval between two printouts, default 10 sec
% 
% chrono: chrono object to be reused with chrono_check().

function chrono = chrono_start(n, interval)

if nargin < 1
  error('Need at least 1 parameter');
end

if nargin < 2
  interval = 10;
end

chrono.n              = n;
chrono.interval       = interval;
chrono.start_time     = 1e5 * now;
chrono.previous_time  = chrono.start_time;
