Please enable JavaScript to view this site.

A-Shell Reference

Reviewed June 2020

xcall TIMES, opcode, elapsed

TIMES returns high-precision time information.  

Parameters

opcode (Num)  [in]

determines operation; see table

elapsed (Num)  [out]

returns the elapsed time in the units and according to the logic described in the following table

Value

Units

Description

1

secs

Returns the number of seconds since midnight. This is equivalent to the system variable TIME, except that if the elapsed parameter is a floating point variable, then the returned value may return fractional seconds.

2

msecs

Returns the number of milliseconds since midnight. As with opcode 1, if elapsed is a floating point variable, a fractional number of milliseconds may be returned.

3

usecs

Returns the number of microseconds elapsed since the previous opcode 3. Note that this is only practical for timing operations lasting only seconds or perhaps minutes, but not hours or days. The first time this routine is called, the return value will be essentially random garbage.