125 of 323
ZBasic System Library 115 ZX Microcontroller Family GetMicroTime Type Subroutine Invocation GetMicroTime(timeBuf) Parameter Method Type Description timeBuf ByRef array of Byte A buffer to be populated with time data. Discussion This routine populates the provided buffer, which must be at least 5 bytes long, with high resolution timing data. This information is most useful in conjunction with a subsequent call to GetElapsedMicroTime() to compute an elapsed time. The low byte of the buffer is set to the value of the TCNT register at the moment of the call. The next four bytes of the buffer represent twice the RTC tick value plus the low bit of the RTC fast tick value, essentially an accumulator of the day’s fast RTC ticks that typically occur at 1024Hz. Example Dim start(1 to 5) as Byte Call GetMicroTime(start) Compatibility This subroutine is not available on ZX models that are based on the ATmega32 processor (e.g. the ZX- 24). Moreover, it is not available in BasicX compatibility mode. See Also GetElapsedMicroTime