Oxygen Basic
		Programming => Example Code => Topic started by: Peter on March 27, 2011, 05:45:24 AM
		
			
			- 
				Deleted
 [attachment deleted by admin]
- 
				
 Hi Peter,
 
 Your demos work well on my Vista PC (118 frames). To experiment with timing and performance  I reduced the frame rate to 30 and introduced Sleep 5 into the WaitFrame cycle. This reduces the actual frame rate to aound 28 frames with a small amount of jitter which was not noticeable in the animation. But it reduced the CPU load from around 33% to around 15%. (1 core=25%)
 
 Charles
 
 
 Sub WaitFrames()
 While (1)
 QueryPerformanceCounter sys_cT2
 iF sys_cT2 >= sys_cT1 + sys_Interval
 QueryPerformanceCounter sys_cT1
 Exit Sub
 End iF
 sleep 5
 Wend
 End Sub