WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Timer speed (https://forum.worldviz.com/showthread.php?t=905)

Jerry 12-08-2006 10:49 AM

Timer speed
 
1) What determines the maximum speed of a timer loop?
Obviously if you are trying to make a visual change, such as
turning a light on and off, there is no point in making the timer
go faster than the frame rate of the video card. But if the timer
loop just makes a simple calculation, say incrementing a variable,
how fast can you make it go?

2) What happens if the loop contains a complex mathematical calculation
that takes longer than the period you specify for the timer? When the
timer times out and the previous calculation has not had time to complete
does it restart the calculation or just ignore timeouts until the calculation
has finished?

farshizzo 12-08-2006 11:01 AM

Timers are not multi-threaded, they run in the same thread as the main graphics loop. If your framerate is 60 fps, then your timer cannot go any faster than 60 Hz.

If you have a timer that takes a long time to calculate, then it will stall the entire graphics loop. No other code will be executed until your timer is finished doing its calculations.


All times are GMT -7. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC