Section: FreeMat Functions
clock command, this function computes
the epoch time, i.e, the time in seconds since January 1,1970
at 00:00:00 UTC. This function is most useful for calculating elapsed
times using the clock, and should be accurate to less than a millisecond
(although the true accuracy depends on accuracy of the argument vector).
The usage for clocktotime is
y = clocktotime(x)
where x must be in the form of the output of clock, that is
x = [year month day hour minute seconds]
clocktotime to time a delay of 1 second
--> x = clock
x =
1.0e+03 *
2.0080 0.0030 0.0170 0 0.0430 0.0424
--> sleep(1)
--> y = clock
y =
1.0e+03 *
2.0080 0.0030 0.0170 0 0.0430 0.0434
--> clocktotime(y) - clocktotime(x)
ans =
1.0010
-->
quit