Navigation: FXLV4_Manager > Using FastExcel calculation methods from VBA >

MICROTIMER function

 

 

 

MICROTIMER function

The MICROTIMER function is a wrapper function for the Windows high-resolution timer API.

The function returns a double containing seconds. The resolution of the timer is dependent on the clock speed of your PC, but is about 1 microsecond on a 1200MHZ AMD. The function itself takes about 5 microseconds to execute when called from VBA on the same machine.

The function is not volatile, and is primarily designed to be called from VBA Subs/Functions rather than from a worksheet.

MICROTIMER Syntax

MICROTIMER()

MICROTIMER Remarks

To call the function from VBA you must first make a reference from the VBE to FastExcelV4:

Open the VBE (Alt F11)

Open a module within your VBA project

Tools->References and check FastExcelV4.

It is also possible to evaluate the function from VBA as a worksheet function using Evaluate, but this incurs significant extra overhead.

 

 

 

Copyright © 2020 Decision Models Ltd