Time

show current time and date

datestr(now)

Timer: tic toc

http://www.mathworks.com/help/matlab/ref/tic.html

tic

% my commands

pause(2)

toc

multiple TIC TOC timers:

t1 = tic

pause(1)

t2 = tic

pause(2)

time2=toc(t2)

time1=toc(t1)