Results 1 to 7 of 7

Thread: faster intervall

  1. #1

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    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

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    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

  3. #3

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: faster intervall

    I can use do ... loop too right?

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    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

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    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!

  6. #6
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    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."

  7. #7
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: faster intervall

    Quote Originally Posted by SJWhiteley View Post
    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
  •  



Click Here to Expand Forum to Full Width