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 = <double> - size: [1 6] Columns 1 to 6 2007.0 4.0 13.0 21.0 37.0 32.2 --> sleep(1) --> y = clock y = <double> - size: [1 6] Columns 1 to 6 2007.00 4.00 13.00 21.00 37.00 33.21 --> clocktotime(y) - clocktotime(x) ans = <double> - size: [1 1] 1.0099999904632568