1
2
3
4
5
function profile(varargin)
  tic;
  func(varargin{:});
  disp(toc);
end