Error in Wiki _limit page?
#2
It's once per 60 seconds.  

DO
   _LIMIT (1 / 60)
LOOP

^ Like the above.

Let me explain what it's doing here.

LIMIT 60 -- this says to let the loop run no more than 60 times per second.
LIMIT 30 -- 30 times per second max loop.
LIMIT 2 -- 2 times per second max loop.
LIMIT 1 -- 1 time per second max loop.
LIMIT 1 / 2 -- 1/2 time per second... or 1 time per 2 seconds, max loop speed.
LIMIT 1 / 3 -- 1/3 time per second... or 1 time per 3 seconds, max loop speed.

So a LIMIT 1 / 60 is a max speed of basically 1 loop per minute. (1 loop per 60 seconds.)

Anything longer than that, the fractions get so small, the math involved gets goofy.  If you need more than a 1/60 limit, then you need to get creative with how you accomplish it.  Wink

DO
     FOR I = 1 TO 10
         _LIMIT 1 / 60
    NEXT
    'Do stuff...
LOOP

^ A loop that only processes once every 10 minutes.
Reply


Messages In This Thread
Error in Wiki _limit page? - by PhilOfPerth - 04-13-2023, 01:00 AM
RE: Error in Wiki _limit page? - by SMcNeill - 04-13-2023, 01:56 AM
RE: Error in Wiki _limit page? - by PhilOfPerth - 04-13-2023, 04:31 AM
RE: Error in Wiki _limit page? - by RhoSigma - 04-13-2023, 07:18 AM



Users browsing this thread: 2 Guest(s)