WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-08-2006, 10:49 AM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
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?
Reply With Quote
  #2  
Old 12-08-2006, 11:01 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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