ir timek kr timek ir times kr times kr timeinstk kr timeinsts
Opcodes to read absolute time since the start of the performance or of an instance of an instrument - in two formats.
timek is for time in k-rate cycles. So with:
sr = 44100 kr = 6300 ksmps = 7
then after half a second, the timek opcode would report 3150. It will always report an integer.
Time in seconds is available with times. This would return 0.5 after half a second.
times and timek can also operate only at the start of the instance of the instrument. Both produce an i-rate variable (starting with i or gi) as their output.
timek and times can both produce a k-rate variable for output.
There are no input parameters.
timeinstk and timeinsts are similar to timek and times, except they return the time since the start of this instance of the instrument.
In Csound 3.52 the opcode names instimes and instimek were changed to timeinsts and timeinstk, repsectively. The original forms were deprecated.