|
-
Apr 20th, 2009, 05:53 AM
#1
Thread Starter
Frenzied Member
faster intervall
Hi,
I would like to know how cam i go faster than 1 interval?
Timer2.Enabled = True
Timer2.Start()
Timer2.Interval = 1
thanks
-
Apr 20th, 2009, 07:00 AM
#2
Re: faster intervall
You cant, not using timers anyways.
If I remember rightly the timer control isnt accurate enough to actually run at 1ms anyways.
You will need to use somthing like System.Environment.TickCount and generate your own timer.
Pino
-
Apr 20th, 2009, 07:02 AM
#3
Thread Starter
Frenzied Member
Re: faster intervall
I can use do ... loop too right?
-
Apr 20th, 2009, 07:06 AM
#4
Re: faster intervall
Yes you can use a Do Loop but code execution is just done as fast as it can not at set intervals.
What are your trying to do? You can only go as fast as the computer.
Pino
-
Apr 20th, 2009, 07:07 AM
#5
Re: faster intervall
Correct, the Do...Loop will run as fast as possible (a function of the code you put into the loop and a function of the speed of your system), however you are not in control of that speed.
I still remember old games that were build on Do..Loops, which I did run on newer systems, and I couldn't see anything animation just because it was running so fast.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Apr 20th, 2009, 09:13 AM
#6
Re: faster intervall
You do know that 1 'interval' is one millisecond, correct?
In addition, the timer will not run that fast: maybe 20 to 50 ms or so at the fastest. The forms based timer is designed for longer timing periods, not such relatively high speed timing.
(Even so, it's not possible to run anything faster than 1ms - even if you could establish a 1ms interval...at this point you require additional hardware and a buffering mechanism. Depending on what you are trying to do, of course...)
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Apr 20th, 2009, 09:15 AM
#7
Re: faster intervall
 Originally Posted by SJWhiteley
You do know that 1 'interval' is one millisecond, correct?
In addition, the timer will not run that fast: maybe 20 to 50 ms or so at the fastest. The forms based timer is designed for longer timing periods, not such relatively high speed timing.
(Even so, it's not possible to run anything faster than 1ms - even if you could establish a 1ms interval...at this point you require additional hardware and a buffering mechanism. Depending on what you are trying to do, of course...)
Yea, as I said only as fast as the hardware will allow. I think the exact accuracy of a timer was about 38 Ms (Not sure where I saw that number :-/)
Cant think what exactly you would need to do ever 1 ms either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|