Please enable JavaScript to view this site.

A-Shell Development History

New XCALL TIMES built-in subroutine returns high-precision time information:

xcall TIMES, opcode, <parms>

The following opcodes have been implemented (so far):

xcall TIMES,1,SEC          ! seconds since midnight

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

xcall TIMES,2,MSECS         ! milliseconds since midnight

opcode 2 returns the number of milliseconds since midnight. As with Op 1, if the MSECS is a floating point variable, a floating point (not necessarily integer) value will be returned.

xcall TIMES,3,USECS         ! usecs elapsed

opcode 3 returns the number of microseconds elapsed since the last 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 called, the return value will be essentially random garbage.