Ask Reuben – December 17, 2025

Throttling

Why is my ON IDLE or ON TIMER not being triggered at the time interval specified?

This is one of the things that is best shown by example.  With the code at the end of the article, execute the program using either GDC or in a Browser. As the code is written, if you do nothing it should display to standard out every 10 seconds as triggered by the ON IDLE and ON TIMER blocks.

Where it gets interesting is if you minimise the GDC or Browser window, or also in the case of the Browser make another Tab have the focus.  What you might observe is the gap between the ON IDLE and ON TIMER blocks being executed is now more than 10 seconds!  If you leave it running in the background (go to lunch), you may observe the gap getting longer and longer.  I have seen the interval getting up to around 180 seconds. From my observations the time will vary by browser and by operating system.

What I believe is happening is something called throttling.  I found a link here which gives some explanation.  At this stage I think it is something to be aware of.  Chances are it is something you will be ok with as the Genero application is not visible on the screen.  If you do have something relying on the ON IDLE or ON TIMER being executed at the designated interval, you may need to review this and look for ways to avoid the throttling occurring.  One possible workaround I have not tried yet is to have the program in the background make some inaudible sound so that it is considered to have “made sound recently” and thus not be subject to throttling!


MAIN
    MENU ""
        ON ACTION EXIT
            EXIT MENU
        ON ACTION current_time
            DISPLAY "ON ACTION current_time "|| CURRENT HOUR TO SECOND
        ON IDLE 10
            DISPLAY "ON IDLE " || CURRENT HOUR TO SECOND
        ON TIMER 10
            DISPLAY "ON TIMER " || CURRENT HOUR TO SECOND
        ON ACTION enterforeground   
            DISPLAY "ON ACTION enterforeground "|| CURRENT HOUR TO SECOND
        ON ACTION enterbackground   
            DISPLAY "ON ACTION enterbackground "|| CURRENT HOUR TO SECOND
    END MENU
END MAIN