To time the duration of an event, use the timeit or tic and toc functions
instead of clock and etime.
The clock function is based on the system time,
which can be adjusted periodically by the operating system, and thus
might not be reliable in time comparison operations.