Contents Previous Next Subchapters

Elapsed Time Corresponding to Clock Values (Mlmode)
Syntax etime(c2c1)
See Also mlmode_clock , tictoc , time

Description
Returns a double-precision scalar containing the number of elapsed seconds corresponding to starting at the clock value c1 and ending at the clock value c2. Here a clock value is a six element row vector containing the year, month, day, hour, minute and second in that order.

Example
If in Mlmode you enter
     c1 = clock;
     pause(3);
     c2 = clock;
     etime(c2, c1)
O-Matrix will print a number close to 3.

Limitations
If the year or the month specified by c1 do not equal the corresponding values in c2, an error will result and the program will halt.