dateInstrument Control:Time Readingdatedate
Returns the number seconds since a base date.
DescriptionPlugin opcode in cs_date.
Returns the number seconds since a base date, using the
operating system's clock. The base is 1 January 1970 for Csound
using doubles, and 1 January 2010 for versions using floats.
On operating systemms with sufficient resolution the date
includes fractional seconds.
Syntaxir[, inano] datekr[, knano] dateInitialization and Performanceir -- value at i-time, of the system clock
in seconds since the start of the epoch.
kr -- value at k-time, of the system clock
in seconds since the start of the epoch.
inano -- value at i-time of the nanoseconds
since last second tick.
knano -- value at k-time of the nanoseconds
since last second tick.
Note that the base date was originally 1970 but since verson
5.14 it has been changed as single precission floating point
numbers are insufficient to indicate changes.
The optional answer and resolution including fractions of a
second introduced in version 6.07.
Examples
Here is an example of the date opcode. It uses the file date.csd.
Example of the date opcode.
Its output should include lines like this:
instr 1: ii = 1447337826.778
instr 1: ij = 778279830.000
Thu Nov 12 14:17:07 2015
Thu Nov 12 14:17:06 2015
Thu Jan 1 01:00:01 1970
See alsoTime ReadingCreditsAuthor: &namejohn;University of Bath/Codemist Ltd.Bath, UKDecember 2006New in Csound version 5.05Changed in Csound version 5.14