vb6 timer object

The interval in this object is the number of milliseconds between when the object completes it's procedure and when it fires again, correct?  In other words, if the interval is set at 1000 and the procedure takes 2.5 seconds to complete then the next time the object fires will be 3.5 seconds after the first, correct?
Bob SchneiderCo-OwnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
1000 millisecond is 1 second, so if the Interval is set to 1000 the procedure will fire every second.
dsackerContract ERP Admin/ConsultantCommented:
If the interval is set at 1000 and the procedure takes 2.5 seconds to complete then the next time the object fires will be 3.5 seconds after the first, correct?
Incorrect. The interval is 1000 milliseconds, regardless, meaning they could overlap.

The best practice is for the first lines in your handler to immediately turn off the timer, and if you wish to repeat, then at the end of your handler, turn the timer back on.
Bob SchneiderCo-OwnerAuthor Commented:
good info.  Thank you.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Martin LissOlder than dirtCommented:
VB6 can only do 1 thing at a time so the executions of the timer will not overlap.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Martin LissOlder than dirtCommented:
To demonstrate set the Interval to 1000 and run this code.

Private Sub Timer1_Timer()
Static times
Debug.Print "Start: " & Now

Dim x
Dim y
Dim z

For x = 1 To 10000
For y = 1 To 10000
z = z

Debug.Print "End: " & Now
times = times + 1
If times = 5 Then Timer1.Enabled = False

End Sub

Open in new window

Bob SchneiderCo-OwnerAuthor Commented:
Good to know...sorry I already assigned points...can I re-open it?
Martin LissOlder than dirtCommented:
I don't see that you've done that, but you can Request Attention and ask a moderator to help you do that.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.