Create a loop without a timer

dmilinovichiiidmilinovichiii Member Posts: 620
edited January 2012 in Working with GS (Mac)
Well the title says it all. I have behaviors in a timer that I want to function endlessly. The problem is that I want the behaviors inside the timer to repeat as fast as possible. The fastest possible with a timer is every 0.01 seconds. How can I remove the timer so the sequence repeats as fast as the device it's running on is able to let it?

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    try put in 0 sec
  • dmilinovichiiidmilinovichiii Member Posts: 620
    I tried that and it didn't work. Any other ideas?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    a timer every 0 seconds will execute the rules in it as fast as the device can. what are you trying to do exactly?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @ JohnPapiomitis
    I'm creating a prime number calculator. Are you sure about that because it doesn't seem any faster.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    I just timed it. It is a little faster to set it at 0 instead of 0.01. So does this mean that it is at its fastest right now?
  • calvin9403calvin9403 Member Posts: 3,186
    0 is the fastest you can get I belive

    because the device will kept doing it once they finish

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Ok. Well I found a faster calculation method that should also help in combination with this, so thank you for your help.
  • calvin9403calvin9403 Member Posts: 3,186
    @rinoy what is your method now? just curious
  • dmilinovichiiidmilinovichiii Member Posts: 620
    I realized that in checking if a number is prime, you only have to check up to the square root of it. For instance, 100 squared is 10. You don't need to check if 100 can be divided evenly by 25 because you would have already found out that 100 divided by 4 equals 25. Before, my app would have checked every number between 1 and half of 100. The new method is far faster at calculating if huge numbers are prime.
  • calvin9403calvin9403 Member Posts: 3,186
    abd also only check the prime number below the square of it

    so 100 just check 2 3 5 7

    Calvin
  • calvin9403calvin9403 Member Posts: 3,186
    oh and that will be awesome with tables, just import a prime number file
Sign In or Register to comment.