Navigation:  thinBasic Modules > Core > Timing >

HiResTimer_Init

Previous pageReturn to chapter overviewNext page

 

Description

 

Check and initialize the high-resolution performance counter.

 

Syntax

 

n = HiResTimer_Init

 

Returns

 

Number

%TRUE if the installed hardware supports a high-resolution performance counter

 

Parameters

 

Name

Type

Optional

Meaning





 

Remarks

 

Call this function once before calling any HiResTimer_Get.

 

Restrictions

 

See also

 

Examples

 

'...

Dim T1, T2 As QUAD

 

'---Initialize hi resolution timer

HiResTimer_Init

 

T1 = HiResTimer_Get

'---Do whatever needed to be measured

T2 = HiResTimer_Get

 

MSGBOX 0, "Elapsed time in microseconds: " & FORMAT$(T2-T1, "#0")

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com