This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Retrieves the current value of the high-resolution performance counter and compute the delta time between current time and previous call of any of the HiResTimer_... functions.
Syntax
n = HiResTimer_Delta
Returns
Number
Returned value are the microseconds elapsed.
Parameters
Name |
Type |
Optional |
Meaning |
Remarks
This function also internally store the last execution timer in order to be able to compute delta timing.
Restrictions
Attention: the function calling itself add some few microseconds overhead.
See also
Examples
USES "Console"
Dim T1, T2 As QUAD
'---Initialize hi resolution timer
HiResTimer_Init
'---Do whatever needed to be measured.
'---Here just sleep for 100 millisecs
SLEEP 100
'---Measure delta
T1 = HiResTimer_Delta
'---Do something else
'---Here just sleep for other 200 millisecs
SLEEP 200
'---Measure delta
T2 = HiResTimer_Delta
PRINTL "Elapsed time for step 1 is " & T1 & "(microseconds)"
PRINTL "Elapsed time for step 2 is " & T2 & "(microseconds)"
WAITKEY