Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Peter on July 16, 2013, 04:25:25 AM
-
Hi Mister Pegge,
I got a problem.
kernel32 = LoadLibrary "kernel32.dll"
Bind kernel32
(
GetModuleHandle GetModuleHandleA
ExitProcess ExitProcess
GetTickCount GetTickCount
Sleep Sleep
Beep Beep
QueryPerformanceCounter QueryPerformanceCounter 'crash
QueryPerformanceFrequency QueryPerformanceFrequency 'crash
)
Declare QueryPerformanceCounter Lib "kernel32.dll" (quad *c) 'has no effect
Declare QueryPerformanceFrequency Lib "kernel32.dll" (quad *c) 'has no effect
X
-
Hi Peter,
kernel32 = LoadLibrary "kernel32.dll"
Bind kernel32
(
GetModuleHandle GetModuleHandleA
ExitProcess ExitProcess
GetTickCount GetTickCount
Sleep Sleep
Beep Beep
QueryPerformanceCounter QueryPerformanceCounter 'crash
QueryPerformanceFrequency QueryPerformanceFrequency 'crash
)
quad t1,t2,f
QueryPerformanceFrequency @f
QueryPerformanceCounter @t1
...
QueryPerformanceCounter @t2
double a=(t2-t1)/f
print str a,6
-
thanks Charles, nothing new.
yes this okay, but QueryPerformanceCounter and QueryPerformanceFrequency don't want to work in a callback. (winproc( sys hwnd, msg, wparm, lparam) as sys callback).
my SetFps routine has no effect here. it shows an instable behaviour.
I think that I will have solved it in the next hours.