Joris wrote:
StarBootics I get six times a zero ?
Debug HighResTimer::Consult() ;all 0
Shouldn't it give the delta-timings ?
(XP SP3)
The fractional parts of the calculation are being rounded to zero before multiplying to find the results. It can be corrected by making the following modification in the Consult() procedure to shift the calculation into using floats throughout the entire calculation:
Change this part:
Code:
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
If Instance\Stopped = #False
QueryPerformanceCounter_(@Instance\EndCount)
EndIf
Instance\StartMicroSec = Instance\StartCount * (1000000 / Instance\Frequency)
Instance\StopMicroSec = Instance\EndCount * (1000000 / Instance\Frequency)
to this:
Code:
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
If Instance\Stopped = #False
QueryPerformanceCounter_(@Instance\EndCount)
EndIf
Instance\StartMicroSec = 0.0 + Instance\StartCount * (1000000 / Instance\Frequency) ; ***
Instance\StopMicroSec = 0.0 + Instance\EndCount * (1000000 / Instance\Frequency) ; ***