There is some weird interplay between DBPro compiler's Display settings and the OS and the Sync command.
All tests were run from a 1024x768 16-bit desktop,
All tests were run with this code.
The tic (`) comment was removed from the Sync command for the Sync tests.
Print "Press a key to start."
Print
Wait Key
START= Timer()
TDISP= START+ 10
TOOLONG= 0
AMTLONG= 0
CTR= 0
Do
CURT= Timer()
If CURT >= TDISP
Rem Track anytime this is excuted at TDISP+1 or greater
If CURT > TDISP Then Inc TOOLONG : AMTLONG= AMTLONG+ (CURT-TDISP)
TDISP= CURT+ 10
Inc CTR
If CTR > 99
Print Str$((CURT- START)/1000.0)+" seconds"
Print "Ideally it should be 1.000"
Print "# of times too long = "+Str$(TOOLONG)
Print "overhead = "+Str$((AMTLONG*100.0)/100000)+" secs."
Print
Print "Press a key to end."
Wait 2
Sync
Wait Key
End
Endif
` Sync
Endif
Loop
WinXP Results (1.8 GHz Celeron):
------------------------------
Pro + WFS + No Sync 1.001
DBC + --- + No Sync 1.041
Pro + WFS + Sync 1.402
Pro + FSE + No Sync 1.943
DBC + --- + Sync 3.125
Pro + FSE + Sync 3.304
Win98 Results (1.2GHz Athlon operating at 900Mhz):
--------------------------------------------------
DBC + --- + No Sync 1.173
Pro + FSE + No Sync 1.175
Pro + FSE + Sync 2.337
DBC + --- + Sync 2.475
Pro + WFS + No Sync 8.754
Pro + WFS + Sync 19.375
Pro = DarkBASIC Professional executable
DBC = DarkBASIC Classic executable
WFS = Compiled in the Windowed Full Screen mode (compiler IDE default)
FSE = Compiled in the Full Screen Exclusive Mode @ 640x480
-------------------------------------------------------------------------------------
These results support what I originally detected using DBPro in FSE mode.
Bottom line is that I am starting to think that somewhere in my program's setup I must run a test like the code above and then based on the results, adjust variables to synchronize the code if running on a different OS than the one it was developed on.
Also doesn't it appear that it is a good idea to stay away from the Windowed Full Screen mode if the code is to run on Windows 98/ME?
The more you see, the more you know.
The more you know, the more you see.