Navigation

Operators and Keywords

Function List:

C++ API

: clock ()

Return the current local date and time as a date vector.

The date vector contains the following fields: current year, month (1-12), day (1-31), hour (0-23), minute (0-59), and second (0-61). The seconds field has a fractional part after the decimal point for extended accuracy.

For example:

fix (clock ())
     ⇒ [ 1993, 8, 20, 4, 56, 1 ]

clock is more accurate on systems that have the gettimeofday function.

See also: now, date, datevec.

Package: octave