Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Timer characteristics 1

Status
Not open for further replies.

jayraykay

Programmer
Mar 10, 2004
22
US
Hello,

If I have a VB timer interval set to 60 seconds, does that 60 seconds begin every 60 seconds or does it start counting after all of the work is done for that interval..

example

I have a routine that take about 5 minutes to run.

If I put this 5 minute routing in a 60 second timer, will the timer start counting again after the 5 minute routine is running or will I have a ton of overlapping routines running??

thanks!
 
If the routines have a DoEvents in them, then you will have a bunch of overlapping routines.
To ensure only one routine happens at a time, why not disable the timer when the routine starts, and turn it back on again when it is finished?
Then you get the next routine 60 seconds after the last one finished running.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top