\t [ [N|[:n ]e] ]
This command has two different uses, according to the parameter. If the parameter is omitted, it shows the number of milliseconds between timer ticks: 0 means the timer is off.
N (integer)Set the number of milliseconds between timer ticks. If 0, the timer is disabled, otherwise the timer is
enabled and the first tick given. On each tick, the function assigned to .z.ts is executed.
This usage corresponds to the -t
command-line option
[:n] e (expression)A q expression e (other than a single integer) is executed and the execution time shown in
milliseconds. Since V3.0 2011.11.22, if n is specified, e is executed
n times.
q)/Show or set timer ticks
q)\t / default off
0
q).z.ts:{show`second$.z.N}
q)\t 1000 / tick each second
q)13:12:52
13:12:53
13:12:54
\t 0 / turn off
q)/Time an expression
q)\t log til 100000 / milliseconds for log of first 100000 numbers
3
q)\t:100 log til 100000 / timing for 100 repetitions
186